aboutsummaryrefslogtreecommitdiff
path: root/src/test/miner_tests.cpp
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2022-05-25 22:06:23 -0400
committerCarl Dong <contact@carldong.me>2022-06-06 15:38:09 -0400
commit0f1a259657280afc727db97689512aef5ca928fc (patch)
treedf44289c04dd3c24f631b92399c1c6a02811f4ae /src/test/miner_tests.cpp
parentcc5739b27df830d138119eaa13f2286d91d0dadd (diff)
downloadbitcoin-0f1a259657280afc727db97689512aef5ca928fc.tar.xz
miner: Make mempool optional for BlockAssembler
...also adjust callers Changes: - In BlockAssembler::CreateNewBlock, we now only lock m_mempool->cs and call addPackageTxs if m_mempool is not nullptr - BlockAssembler::addPackageTxs now takes in a mempool reference, and is annotated to require that mempool's lock. - In TestChain100Setup::CreateBlock and generateblock, don't construct an empty mempool, just pass in a nullptr for mempool
Diffstat (limited to 'src/test/miner_tests.cpp')
-rw-r--r--src/test/miner_tests.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp
index 439ad174b3..eca4fbf15c 100644
--- a/src/test/miner_tests.cpp
+++ b/src/test/miner_tests.cpp
@@ -52,7 +52,7 @@ BlockAssembler MinerTestingSetup::AssemblerForTest(const CChainParams& params)
options.nBlockMaxWeight = MAX_BLOCK_WEIGHT;
options.blockMinFeeRate = blockMinFeeRate;
- return BlockAssembler{m_node.chainman->ActiveChainstate(), *m_node.mempool, options};
+ return BlockAssembler{m_node.chainman->ActiveChainstate(), m_node.mempool.get(), options};
}
constexpr static struct {