Page MenuHomePhabricator

test: Avoid intermittent errors in feture_index_prune.py
ClosedPublic

Authored by PiRK on Jul 8 2025, 07:27.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable