Skip to content

Commit

Permalink
test: Add missing syncwithvalidationinterfacequeue
Browse files Browse the repository at this point in the history
Summary:
The index on the block filters is running in the background on the validation interface. To avoid intermittent test failures, it needs to be synced.

This concludes backport of [[bitcoin/bitcoin#22311 | core#22311]]
bitcoin/bitcoin@fadddd1

Depends on D11445

Test Plan: `test/functional/test_runner.py p2p_blockfilters`

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D11446
  • Loading branch information
MarcoFalke authored and PiRK committed May 11, 2022
1 parent 2addcd8 commit 196f3dd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/functional/p2p_blockfilters.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def run_test(self):
self.disconnect_nodes(0, 1)

stale_block_hash = self.nodes[0].generate(1)[0]
self.nodes[0].syncwithvalidationinterfacequeue()
assert_equal(self.nodes[0].getblockcount(), 1000)

self.nodes[1].generate(1001)
Expand Down Expand Up @@ -93,6 +94,7 @@ def run_test(self):
self.log.info("Reorg node 0 to a new chain.")
self.connect_nodes(0, 1)
self.sync_blocks(timeout=600)
self.nodes[0].syncwithvalidationinterfacequeue()

main_block_hash = self.nodes[0].getblockhash(1000)
assert main_block_hash != stale_block_hash, "node 0 chain did not reorganize"
Expand Down

0 comments on commit 196f3dd

Please sign in to comment.