Page MenuHomePhabricator

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

Authored by majcosta on Jul 17 2020, 02:40.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/validation.h
705 ↗(On Diff #22326)

Nit:

/**
 * lorem ipsum
 */
803 ↗(On Diff #22326)

explicit

This revision is now accepted and ready to land.Jul 17 2020, 06:59