HomePhabricator

Cache block index entry corresponding to assumeutxo snapshot base blockhash

Description

Cache block index entry corresponding to assumeutxo snapshot base blockhash

Summary:
This is to (a) avoid repeated lookups into the block index for an entry that
should never change and (b) emphasize that the snapshot base should always
exist when set and not change during the runtime of the program.

Thanks to Russ Yanofsky for suggesting this approach.

Also remove adjacent unused function reliesOnAssumedValid

This concludes backport of core#27746
https://github.com/bitcoin/bitcoin/pull/27746/commits/d4a11abb1972b54f0babdccfbb2fde97ab885933
https://github.com/bitcoin/bitcoin/pull/27746/commits/a733dd79e29068ad1e0532ac42a45188a040a7b9

Depends on D17537

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
Suhas Daftuar <sdaftuar@chaincode.com>Authored on Jun 27 2023, 16:11
PiRKCommitted on Fri, Jan 17, 08:07
PiRKPushed on Fri, Jan 17, 08:07
Reviewer
Restricted Project
Differential Revision
D17541: Cache block index entry corresponding to assumeutxo snapshot base blockhash
Parents
rABCa5d25d3b48f3: Move CheckBlockIndex() from Chainstate to ChainstateManager
Branches
Unknown
Tags
Unknown