HomePhabricator

test: Avoid intermittent errors in feture_index_prune.py

Description

test: Avoid intermittent errors in feture_index_prune.py

Summary:
The test uses the P2P network to sync blocks, which has no inherent guarantee that the blocks are sent and received in the right order, assuming the headers are received first.
This can mean that the first block file is flushed with block at height 346 and block at height 345 is added to the second file, causing assert_equal(pruneheight_new, 345) to fail.
Fix the issue by using a linear dumb sync.`

Also, after syncing the blocks, we didn't check that the indexes have caught up to the tip before manually pruning.
This could lead to prune blockers lower that the expected height.

This is a backport of core#26417 and core#31468

Test Plan: ninja check-functional

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>Authored on Dec 11 2024, 15:31
PiRKCommitted on Jul 8 2025, 10:19
PiRKPushed on Jul 8 2025, 10:19
Reviewer
Restricted Project
Differential Revision
D18337: test: Avoid intermittent errors in feture_index_prune.py
Parents
rABCf4cc4ec65ccb: [chronik] Electrum: make the documentation public
Branches
Unknown
Tags
Unknown