Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge bitcoin/bitcoin#31468: test: Avoid intermittent error in assert…
…_equal(pruneheight_new, 248) fa0998f test: Avoid intermittent error in assert_equal(pruneheight_new, 248) (MarcoFalke) Pull request description: Fixes bitcoin/bitcoin#31446 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 249 and block at height 248 is added to the second file. In the log it looks like: `Leaving block file 0: CBlockFileInfo(blocks=249, size=65319, heights=0...249, time=2011-02-02...2024-12-03) (onto 1) (height 248)`. The test assumes that the height of the last pruned block in the first file is 248, expecting it to look like: `Leaving block file 0: CBlockFileInfo(blocks=249, size=65319, heights=0...248, time=2011-02-02...2024-12-09) (onto 1) (height 249) `. Fix the issue by using a linear dumb sync. ACKs for top commit: achow101: ACK fa0998f mzumsande: Code Review ACK fa0998f i-am-yuvi: Code Review ACK fa0998f fjahr: Code review ACK fa0998f Tree-SHA512: 59cb4317be6cf9012c9bf7a3e9f5ba96b8b114b30bd2ac42af4fe742cd26a634d685b075f04a84bd782b2a43a342d75bb20a042bd82ad2831dbf844d39517ca2
- Loading branch information