From 2e75ebb6169da08b04c4769555c4c84d6b5ca0ec Mon Sep 17 00:00:00 2001 From: glozow Date: Thu, 16 Jan 2025 13:56:11 -0500 Subject: [PATCH] [test] fix p2p_orphan_handling.py empty orphanage check It's possible getorphantxs isn't empty immediately. Prevent intermittent errors. --- test/functional/p2p_orphan_handling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/p2p_orphan_handling.py b/test/functional/p2p_orphan_handling.py index 4a2d53cd2b3..dc58a220682 100755 --- a/test/functional/p2p_orphan_handling.py +++ b/test/functional/p2p_orphan_handling.py @@ -59,7 +59,7 @@ def wrapper(self): self.nodes[0].disconnect_p2ps() self.nodes[0].bumpmocktime(LONG_TIME_SKIP) # Check that mempool and orphanage have been cleared - assert_equal(0, len(self.nodes[0].getorphantxs())) + self.wait_until(lambda: len(self.nodes[0].getorphantxs()) == 0) assert_equal(0, len(self.nodes[0].getrawmempool())) self.wallet.rescan_utxos(include_mempool=True) return wrapper