HomePhabricator

validation: make CChainState::m_mempool optional

Description

validation: make CChainState::m_mempool optional

Summary:

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.

Partial backport of core#22415:
https://github.com/bitcoin/bitcoin/pull/22415/commits/617661703ac29e0744f21de74501d033fdc53ff6#diff-1b75f2d827c545064a075d3a1a1414ddcf11edef153a1bd0e103adcc80c8e219

Also includes a missing null pointer check from D9780 in GetCoinsCacheSizeState().

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, sdulfari

Reviewed By: #bitcoin_abc, sdulfari

Differential Revision: https://reviews.bitcoinabc.org/D12229

Details

Provenance
FabienAuthored on Oct 12 2022, 16:28
FabienPushed on Oct 13 2022, 08:25
Reviewer
Restricted Project
Differential Revision
D12229: validation: make CChainState::m_mempool optional
Parents
rABC1471360d89c8: [Automated] Update timing.json
Branches
Unknown
Tags
Unknown