Skip to content

Commit 3f4b104

Browse files
committed
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
1 parent b432e36 commit 3f4b104

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/functional/p2p_orphan_handling.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ def assert_no_immediate_response(self, message):
113113

114114
def assert_never_requested(self, txhash):
115115
"""Check that the node has never sent us a getdata for this hash (int type)"""
116+
self.sync_with_ping()
116117
for getdata in self.getdata_received:
117118
for request in getdata.inv:
118119
assert request.hash != txhash

0 commit comments

Comments
 (0)