Skip to content

Commit fa11ff2

Browse files
author
MarcoFalke
committed
test: Pass empty tx pool to block assembler
1 parent fa96574 commit fa11ff2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/test/util/setup_common.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,10 @@ TestChain100Setup::TestChain100Setup()
215215
CBlock TestChain100Setup::CreateAndProcessBlock(const std::vector<CMutableTransaction>& txns, const CScript& scriptPubKey)
216216
{
217217
const CChainParams& chainparams = Params();
218-
CBlock block = BlockAssembler(*m_node.mempool, chainparams).CreateNewBlock(scriptPubKey)->block;
218+
CTxMemPool empty_pool;
219+
CBlock block = BlockAssembler(empty_pool, chainparams).CreateNewBlock(scriptPubKey)->block;
219220

220-
// Replace mempool-selected txns with just coinbase plus passed-in txns:
221-
block.vtx.resize(1);
221+
Assert(block.vtx.size() == 1);
222222
for (const CMutableTransaction& tx : txns) {
223223
block.vtx.push_back(MakeTransactionRef(tx));
224224
}

0 commit comments

Comments
 (0)