From 553ed8482fd78e8db22257ee833487628b584aa1 Mon Sep 17 00:00:00 2001 From: teodanciu Date: Mon, 1 Jul 2024 21:06:45 +0100 Subject: [PATCH] Fix inaccuracy in generating excessive refScript size in `LedgerSpec` --- .../impl/testlib/Test/Cardano/Ledger/Conway/Imp/LedgerSpec.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/LedgerSpec.hs b/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/LedgerSpec.hs index 5d60a2a0057..6ab7a71cc98 100644 --- a/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/LedgerSpec.hs +++ b/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/LedgerSpec.hs @@ -30,8 +30,7 @@ spec = let script :: Script era script = fromPlutusScript plutusScript size = originalBytesSize script - (q, r) = maxRefScriptSizePerTx `quotRem` size - n = q + signum r + n = maxRefScriptSizePerTx `div` size + 1 txIns <- replicateM n (produceRefScript script) let tx :: Tx era tx = mkBasicTx (mkBasicTxBody & referenceInputsTxBodyL .~ Set.fromList txIns)