HomePhabricator

Clear pindexBestHeader in ChainstateManager::Unload()

Description

Clear pindexBestHeader in ChainstateManager::Unload()

Summary:

Code Reviewer Notes

Call graph of relevant functions:

UnloadBlockIndex() <-- Moved from
calls ChainstateManager::Unload() <-- Moved to

Safe because ChainstateManager::Unload() is called only by
UnloadBlockIndex() and no other callers.

This is a partial backport of core#24909
https://github.com/bitcoin/bitcoin/pull/24909/commits/c96524113c48553c4bbad63077a25494eca8159e

Depends on D13044

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
Carl Dong <contact@carldong.me>Authored on Feb 23 2022, 20:21
PiRKCommitted on Jan 24 2023, 13:29
PiRKPushed on Jan 24 2023, 13:29
Reviewer
Restricted Project
Differential Revision
D13045: Clear pindexBestHeader in ChainstateManager::Unload()
Parents
rABCe52a93e568aa: move-mostly: Make pindexBestHeader a ChainMan member
Branches
Unknown
Tags
Unknown