HomePhabricator

Add functions to construct locators without CChain

Description

Add functions to construct locators without CChain

Summary:
This introduces an insignificant performance penalty, as it means locator
construction needs to use the skiplist-based CBlockIndex::GetAncestor()
function instead of the lookup-based CChain, but avoids the need for
callers to have access to a relevant CChain object.

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

Depends on D15124

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
Pieter Wuille <pieter@wuille.net>Authored on Aug 8 2022, 00:56
PiRKCommitted on Jan 16 2024, 08:11
PiRKPushed on Jan 16 2024, 08:11
Reviewer
Restricted Project
Differential Revision
D15125: Add functions to construct locators without CChain
Parents
rABC6040be892224: Add bitdeque, an std::deque<bool> analogue that does bit packing.
Branches
Unknown
Tags
Unknown