test: Fix race condition in IPC interface block propagation test

This commit is contained in:
Fabian Jahr 2025-11-15 23:53:34 +02:00
parent c66e988754
commit 2578e6fc0f
No known key found for this signature in database
GPG Key ID: F13D1E9D890798CD

View File

@ -256,9 +256,11 @@ class IPCInterfaceTest(BitcoinTestFramework):
assert_equal(res.result, True)
self.log.debug("Block should propagate")
assert_equal(self.nodes[1].getchaintips()[0]["height"], current_block_height + 1)
# Check that the IPC node actually updates its own chain
assert_equal(self.nodes[0].getchaintips()[0]["height"], current_block_height + 1)
# Stalls if a regression causes submitBlock() to accept an invalid block:
self.sync_all()
# Check that the other node accepts the block
assert_equal(self.nodes[0].getchaintips()[0], self.nodes[1].getchaintips()[0])
miniwallet.rescan_utxos()