HomePhabricator

validation: add chainman ref to CChainState

Description

validation: add chainman ref to CChainState

Summary:
Add an upwards reference to chainstate instances to the owning
ChainstateManager. This is necessary because there are a number
of this_chainstate == chainman.ActiveChainstate() checks that
will happen (as a result of assumeutxo) in functions that otherwise
don't have an easily-accessible reference to the chainstate's
ChainManager.

This is a backport of core#21526 [1/12]
https://github.com/bitcoin/bitcoin/pull/21526/commits/9f6bb539359b98d5b39482ab8a28a68608f0c645

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
James O'Beirne <james.obeirne@pm.me>Authored on Jun 12 2021, 14:52
PiRKCommitted on Oct 19 2022, 11:34
PiRKPushed on Oct 19 2022, 11:34
Reviewer
Restricted Project
Differential Revision
D12277: validation: add chainman ref to CChainState
Parents
rABCef4a12beb31a: log: Clarify log message when file does not exist
Branches
Unknown
Tags
Unknown