diff --git a/src/miner.h b/src/miner.h --- a/src/miner.h +++ b/src/miner.h @@ -203,7 +203,8 @@ // helper function for addPriorityTxs /** Test if tx will still "fit" in the block */ - TestForBlockResult TestForBlock(CTxMemPool::txiter iter); + TestForBlockResult TestForBlock(const Config &config, + CTxMemPool::txiter iter); /** Test if tx still has unconfirmed parents not yet in block */ bool isStillDependent(CTxMemPool::txiter iter); diff --git a/src/miner.cpp b/src/miner.cpp --- a/src/miner.cpp +++ b/src/miner.cpp @@ -310,7 +310,7 @@ } BlockAssembler::TestForBlockResult -BlockAssembler::TestForBlock(CTxMemPool::txiter it) { +BlockAssembler::TestForBlock(const Config &config, CTxMemPool::txiter it) { auto blockSizeWithTx = nBlockSize + ::GetSerializeSize(it->GetTx(), SER_NETWORK, PROTOCOL_VERSION); @@ -344,7 +344,7 @@ // Must check that lock times are still valid. This can be removed once MTP // is always enforced as long as reorgs keep the mempool consistent. CValidationState state; - if (!ContextualCheckTransaction(*config, it->GetTx(), state, nHeight, + if (!ContextualCheckTransaction(config, it->GetTx(), state, nHeight, nLockTimeCutoff, nMedianTimePast)) { return TestForBlockResult::TXCantFit; } @@ -639,7 +639,7 @@ continue; } - TestForBlockResult testResult = TestForBlock(iter); + TestForBlockResult testResult = TestForBlock(config, iter); // Break if the block is completed if (testResult == TestForBlockResult::BlockFinished) { break;