HomePhabricator

Clear fHavePruned in BlockManager::Unload()

Description

Clear fHavePruned in BlockManager::Unload()

Summary:

Code Reviewer Notes

Call graph of relevant functions:

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

So calling UnloadBlockIndex() would still run this moved code. The code
will also now run when ~BlockManager gets called, which makes sense.

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

Depends on D13046

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
Carl Dong <contact@carldong.me>Authored on Feb 23 2022, 20:22
PiRKCommitted on Jan 24 2023, 13:29
PiRKPushed on Jan 24 2023, 13:29
Reviewer
Restricted Project
Differential Revision
D13047: Clear fHavePruned in BlockManager::Unload()
Parents
rABC09cfec606201: move-mostly: Make fHavePruned a BlockMan member
Branches
Unknown
Tags
Unknown