From fa11ff29803ca4f5fd0035bede697448cff7d960 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Fri, 21 Aug 2020 15:20:10 +0200 Subject: [PATCH] test: Pass empty tx pool to block assembler --- src/test/util/setup_common.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/util/setup_common.cpp b/src/test/util/setup_common.cpp index c882ae38f26..e3d396e96d0 100644 --- a/src/test/util/setup_common.cpp +++ b/src/test/util/setup_common.cpp @@ -215,10 +215,10 @@ TestChain100Setup::TestChain100Setup() CBlock TestChain100Setup::CreateAndProcessBlock(const std::vector& txns, const CScript& scriptPubKey) { const CChainParams& chainparams = Params(); - CBlock block = BlockAssembler(*m_node.mempool, chainparams).CreateNewBlock(scriptPubKey)->block; + CTxMemPool empty_pool; + CBlock block = BlockAssembler(empty_pool, chainparams).CreateNewBlock(scriptPubKey)->block; - // Replace mempool-selected txns with just coinbase plus passed-in txns: - block.vtx.resize(1); + Assert(block.vtx.size() == 1); for (const CMutableTransaction& tx : txns) { block.vtx.push_back(MakeTransactionRef(tx)); }