HomePhabricator

Update CheckBlockIndex invariants for chains based on an assumeutxo snapshot

Description

Update CheckBlockIndex invariants for chains based on an assumeutxo snapshot

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

This change allows us to remove the hack introduced in D14653 and D15815 to temporarily disable CheckBlockIndex while resetting a chain.

Depends on D17433

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
Suhas Daftuar <sdaftuar@chaincode.com>Authored on Jun 6 2023, 17:56
PiRKCommitted on Fri, Jan 17, 08:07
PiRKPushed on Fri, Jan 17, 08:07
Reviewer
Restricted Project
Differential Revision
D17440: Update CheckBlockIndex invariants for chains based on an assumeutxo snapshot
Parents
rABC5ad8a704fdcb: Move block-arrival information / preciousblock counters to ChainstateManager
Branches
Unknown
Tags
Unknown