aboutsummaryrefslogtreecommitdiff
path: root/src/test/util/setup_common.cpp
diff options
context:
space:
mode:
authorJames O'Beirne <james.obeirne@pm.me>2021-07-06 17:05:25 -0400
committerJames O'Beirne <james.obeirne@pm.me>2021-07-13 11:11:35 -0400
commit617661703ac29e0744f21de74501d033fdc53ff6 (patch)
tree0c1914add1d688e1df8025516f555e89ee782544 /src/test/util/setup_common.cpp
parent088b348dbe82689ce1782653c8fdcebb3b636eb5 (diff)
downloadbitcoin-617661703ac29e0744f21de74501d033fdc53ff6.tar.xz
validation: make CChainState::m_mempool optional
Since we now have multiple chainstate objects, only one of them is active at any given time. An active chainstate has a mempool, but there's no point to others having one. This change will simplify proposed assumeutxo semantics. See the discussion here: https://github.com/bitcoin/bitcoin/pull/15606#pullrequestreview-692965905 Co-authored-by: Russell Yanofsky <russ@yanofsky.org>
Diffstat (limited to 'src/test/util/setup_common.cpp')
-rw-r--r--src/test/util/setup_common.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/util/setup_common.cpp b/src/test/util/setup_common.cpp
index 748272bb1d..d9d236be1d 100644
--- a/src/test/util/setup_common.cpp
+++ b/src/test/util/setup_common.cpp
@@ -180,7 +180,7 @@ TestingSetup::TestingSetup(const std::string& chainName, const std::vector<const
// instead of unit tests, but for now we need these here.
RegisterAllCoreRPCCommands(tableRPC);
- m_node.chainman->InitializeChainstate(*m_node.mempool);
+ m_node.chainman->InitializeChainstate(m_node.mempool.get());
m_node.chainman->ActiveChainstate().InitCoinsDB(
/* cache_size_bytes */ 1 << 23, /* in_memory */ true, /* should_wipe */ false);
assert(!m_node.chainman->ActiveChainstate().CanFlushToDisk());