Page MenuHomePhabricator

validation: make CChainState::m_mempool optional
ClosedPublic

Authored by Fabien on Oct 12 2022, 19:30.

Details

Reviewers
sdulfari
Group Reviewers
Restricted Project
Commits
rABCa1b2f0d96556: 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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable