HomePhabricator

[backport#16194] refactoring: move block metadata structures into BlockManager

Description

[backport#16194] refactoring: move block metadata structures into BlockManager

Summary:
Separate out the management of chain-agnostic block metadata from any given
CChainState instance. This allows us to avoid duplicating data like
mapBlockIndex unnecessarily for multiple chainstates.

This also adds a CChainState constructor that accepts and sets m_blockman.
Ultimately this reference will point to a BlockMan instance that
is shared across CChainStates.

This commit can be decomposed into smaller commits if necessary.


Partial backport of Core PR16194

Test Plan:

ninja check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
James O'Beirne <james.obeirne@gmail.com>Authored on Mar 27 2019, 21:07
majcostaCommitted on Sep 22 2020, 23:47
majcostaPushed on Sep 22 2020, 23:47
Reviewer
Restricted Project
Differential Revision
D6959: [backport#16194] refactoring: move block metadata structures into BlockManager
Parents
rABC0b16c6b94811: wallet: Tidy CWallet::SetUsedDestinationState
Branches
Unknown
Tags
Unknown