mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-21 12:22:50 -05:00
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
This commit is contained in:
parent
b432e36742
commit
3f4b104b1b
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue