diff options
author | James O'Beirne <james.obeirne@pm.me> | 2021-07-06 17:05:25 -0400 |
---|---|---|
committer | James O'Beirne <james.obeirne@pm.me> | 2021-07-13 11:11:35 -0400 |
commit | 617661703ac29e0744f21de74501d033fdc53ff6 (patch) | |
tree | 0c1914add1d688e1df8025516f555e89ee782544 /src/test/validation_flush_tests.cpp | |
parent | 088b348dbe82689ce1782653c8fdcebb3b636eb5 (diff) | |
download | bitcoin-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/validation_flush_tests.cpp')
-rw-r--r-- | src/test/validation_flush_tests.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/validation_flush_tests.cpp b/src/test/validation_flush_tests.cpp index a3b344d2c9..2572e2025b 100644 --- a/src/test/validation_flush_tests.cpp +++ b/src/test/validation_flush_tests.cpp @@ -20,7 +20,7 @@ BOOST_AUTO_TEST_CASE(getcoinscachesizestate) { CTxMemPool mempool; BlockManager blockman{}; - CChainState chainstate{mempool, blockman}; + CChainState chainstate{&mempool, blockman}; chainstate.InitCoinsDB(/*cache_size_bytes*/ 1 << 10, /*in_memory*/ true, /*should_wipe*/ false); WITH_LOCK(::cs_main, chainstate.InitCoinsCache(1 << 10)); CTxMemPool tx_pool{}; |