mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
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>
This commit is contained in:
parent
088b348dbe
commit
617661703a
7 changed files with 64 additions and 40 deletions
|
|
@ -1349,7 +1349,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
|||
const int64_t load_block_index_start_time = GetTimeMillis();
|
||||
try {
|
||||
LOCK(cs_main);
|
||||
chainman.InitializeChainstate(*Assert(node.mempool));
|
||||
chainman.InitializeChainstate(Assert(node.mempool.get()));
|
||||
chainman.m_total_coinstip_cache = nCoinCacheUsage;
|
||||
chainman.m_total_coinsdb_cache = nCoinDBCache;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue