HomePhabricator

assumeutxo,p2p: Start downloading historical blocks from common ancestor

Description

assumeutxo,p2p: Start downloading historical blocks from common ancestor

Summary:
Otherwise, if the background tip is not an ancestor of the snapshot, blocks in between that ancestor up to the height of the background tip will never be requested.
Test loadtxoutset in divergent chain with less work.

Also guard against a m_mempool nullptr dereference which can happen in this situation, as the assumeutxo background chain does not maintain a mempool.

Co-authored-by: Martin Zumsande <mzumsande@gmail.com>
Co-authored-by: Alfonso Roman Zubeldia <19962151+alfonsoromanz@users.noreply.github.com>

This is a backport of core#29996
Depends on D17962

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
Martin Zumsande <mzumsande@gmail.com>Authored on Jun 10 2024, 22:20
PiRKCommitted on Tue, Apr 22, 21:43
PiRKPushed on Tue, Apr 22, 21:43
Reviewer
Restricted Project
Differential Revision
D17966: assumeutxo,p2p: Start downloading historical blocks from common ancestor
Parents
rABCa2de9f32d7c5: [avalanche] Poll for the transactions that didn't make it into the last block
Branches
Unknown
Tags
Unknown
References
HEAD -> master