HomePhabricator

[backport#16194] refactoring: remove mapBlockIndex global

Description

[backport#16194] refactoring: remove mapBlockIndex global

Summary:
in lieu of ::BlockIndex().

https://github.com/bitcoin/bitcoin/pull/16194/commits/682a1d0f2004d808b87b3106d0dfae547005e638


Depends on D6968

Concludes backport of Core PR16194

Notes: This backport originally changes LookupBlockIndex from being defined inline in validation.h to declared there and defined in validation.cpp.
Since we have that function defined in chain.h, I have chosen to defer to the change in the backport to stick closer to Core.
That has the unfortunate side effect of bringing back the checkpoints -> validation -> checkpoints circular dependency, that I plan on resolving by backporting Core PR15655, if this diff is landed as is.

Test Plan:

ninja check-all --extended

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

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

Details

Provenance
James O'Beirne <james.obeirne@gmail.com>Authored on Apr 10 2019, 18:34
majcostaCommitted on Sep 22 2020, 23:55
majcostaPushed on Sep 22 2020, 23:55
Reviewer
Restricted Project
Differential Revision
D6970: [backport#16194] refactoring: remove mapBlockIndex global
Parents
rABC3f95b1f4baf5: [backport#16194] refactoring: make pindexBestInvalid internal to validation.cpp
Branches
Unknown
Tags
Unknown