aboutsummaryrefslogtreecommitdiff
path: root/src/test/util/setup_common.cpp
diff options
context:
space:
mode:
authorMarcoFalke <[email protected]>2020-08-21 15:20:10 +0200
committerMarcoFalke <[email protected]>2020-08-21 18:44:50 +0200
commitfa11ff29803ca4f5fd0035bede697448cff7d960 (patch)
tree1cb5cb01743ab39d2fa1a7c43eff8b94b6c23a4a /src/test/util/setup_common.cpp
parenttest: Move doxygen comment to header (diff)
downloaddiscoin-fa11ff29803ca4f5fd0035bede697448cff7d960.tar.xz
discoin-fa11ff29803ca4f5fd0035bede697448cff7d960.zip
test: Pass empty tx pool to block assembler
Diffstat (limited to 'src/test/util/setup_common.cpp')
-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 c882ae38f..e3d396e96 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));
}