HomePhabricator

[refactor] move Park and InvalidateBlock to CChainState public API

Description

[refactor] move Park and InvalidateBlock to CChainState public API

Summary:
Future PR16849 (D7204) introduces locking m_cs_chainstate to their version of InvalidateBlock. Our codepath for that is shared by ParkBlock, InvalidateBlock and FinalizeBlock, so having all three be members of CChainState (FinalizeBlock already is) makes sense.

Also made UnwindBlock private since it's not supposed to be called by just anyone, rather by stuff that knows what they're doing -, and moved FinalizeBlock implementation to be closer to the other two since that makes more sense.

Test Plan:

cmake .. -DCMAKE_BUILD_TYPE=Debug -GNinja
ninja check check-functional

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

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

Details

Provenance
majcostaAuthored on Aug 17 2020, 16:49
majcostaPushed on Aug 18 2020, 12:43
Reviewer
Restricted Project
Differential Revision
D7203: [refactor] move Park and InvalidateBlock to CChainState public API
Parents
rABC833f4496bb6b: Make descriptor test deterministic
Branches
Unknown
Tags
Unknown