Page MenuHomePhabricator

Update CheckBlockIndex invariants for chains based on an assumeutxo snapshot
Changes PlannedPublic

Authored by PiRK on Tue, Dec 31, 10:50.

Details

Reviewers
None
Group Reviewers
Restricted Project
Summary

Update CheckBlockIndex invariants for chains based on an assumeutxo snapshot

https://github.com/bitcoin/bitcoin/pull/27746/commits/272fbc370c4e133d31d9f1d34e327cc265c5fad2

test: Clear block index flags when testing snapshots

When simulating a snapshot, remove the HAVE_DATA status for blocks below the
snapshot height, to simulate never having downloaded them at all. This makes
tests more realistic (and more closely match what will happen when using
assumeutxo).

https://github.com/bitcoin/bitcoin/pull/27746/commits/3cfc75366e6596942cbc84f354f42dfd7fc5c073

This is a partial backport of core#27746

Depends on D17433

Test Plan

ninja all check-all

Event Timeline

PiRK requested review of this revision.Tue, Dec 31, 10:50
PiRK planned changes to this revision.Tue, Dec 31, 15:15

I have a test failing in a later commit due to an assertion in validation.cpp on line 6093 (Assertion pindex->nStatus.isOnParkedChain() || setBlockIndexCandidates.count(pindex)' failed..) I need to check if I missed something here, or if the issue is introduced later.