From 3f4b104b1b7e1b87c0be8e395e02b6ae3c5d7b08 Mon Sep 17 00:00:00 2001 From: Sergi Delgado Segura Date: Wed, 29 Jan 2025 14:37:33 -0500 Subject: [PATCH] test: make sure we are on sync with a peer before checking if they have sent a message p2p_orphan_handling checks whether a message has not been requested slightly too soon, making the check always succeed. This passes unnoticed since the expected result is for the message to not have been received, but it will make the test not catch a relevant change that should make it fail --- test/functional/p2p_orphan_handling.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/functional/p2p_orphan_handling.py b/test/functional/p2p_orphan_handling.py index dc58a220682..963d92485c1 100755 --- a/test/functional/p2p_orphan_handling.py +++ b/test/functional/p2p_orphan_handling.py @@ -113,6 +113,7 @@ class PeerTxRelayer(P2PTxInvStore): def assert_never_requested(self, txhash): """Check that the node has never sent us a getdata for this hash (int type)""" + self.sync_with_ping() for getdata in self.getdata_received: for request in getdata.inv: assert request.hash != txhash