aboutsummaryrefslogtreecommitdiff
path: root/src/test/util
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-08-21 15:20:10 +0200
committerMarcoFalke <falke.marco@gmail.com>2020-08-21 18:44:50 +0200
commitfa11ff29803ca4f5fd0035bede697448cff7d960 (patch)
tree1cb5cb01743ab39d2fa1a7c43eff8b94b6c23a4a /src/test/util
parentfa96574b0d2d2c0880447f163cd0280fb3551910 (diff)
test: Pass empty tx pool to block assembler
Diffstat (limited to 'src/test/util')
-rw-r--r--src/test/util/setup_common.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/util/setup_common.cpp b/src/test/util/setup_common.cpp
index c882ae38f2..e3d396e96d 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<CMutableTransaction>& 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));
}