diff --git a/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Mempool/Update.hs b/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Mempool/Update.hs index e41b3669f8..7177e31694 100644 --- a/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Mempool/Update.hs +++ b/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Mempool/Update.hs @@ -185,10 +185,10 @@ pureTryAddTx cfg txSize wti tx is -- mempool, and... | let curSize = msNumBytes $ isMempoolSize is , curSize < getMempoolCapacityBytes (isCapacity is) - -- ... if the mempool has less than 2.5 mebibytes of ref scripts. - , let maxTotalRefScriptSize = 5 * 512 * 1024 -- 2.5 Mebibytes - curTotalRefScriptSize = isTotalRefScriptSize is - , curTotalRefScriptSize Prelude.< maxTotalRefScriptSize + , let curTotalRefScriptSize = isTotalRefScriptSize is + newTxRefScriptSize = txRefScriptSize cfg (isLedgerState is) tx + maxTotalRefScriptSize = 1024 * 1024 -- 1MiB + , curTotalRefScriptSize + newTxRefScriptSize Prelude.<= maxTotalRefScriptSize = case eVtx of -- We only extended the ValidationResult with a single transaction