Page MenuHomePhabricator

Only load BlockMan in BlockMan member functions
ClosedPublic

Authored by PiRK on Jan 23 2023, 10:14.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC3d50222404e8: Only load BlockMan in BlockMan member functions
Summary

This commit effectively splits the "load block index itself" logic from
"derive Chainstate variables from loaded block index" logic.

This means that BlockManager::LoadBlockIndex{,DB} will only load what's
relevant to the BlockManager.

I strongly recommend reviewing with the following git-diff flags:

--color-moved=dimmed_zebra --color-moved-ws=allow-indentation-change

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

Depends on D13021

The sorting code is deduplicated in D13023

Test Plan

ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Jan 23 2023, 10:14
Fabien requested changes to this revision.Jan 23 2023, 14:15
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/validation.cpp
5011 ↗(On Diff #37631)

This is duplicated code

This revision now requires changes to proceed.Jan 23 2023, 14:15

This is deduplicated in the next diffs, you really need to add this info to the summary to prevent these back and forth reviews

This revision is now accepted and ready to land.Jan 23 2023, 14:21
PiRK edited the test plan for this revision. (Show Details)