Page MenuHomePhabricator

Cache block index entry corresponding to assumeutxo snapshot base blockhash
AcceptedPublic

Authored by PiRK on Wed, Jan 15, 20:55.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
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