Skip to content

Commit d667e57

Browse files
MarcoFalkePastaPastaPasta
authored andcommitted
Merge bitcoin#20466: test: Fix intermittent p2p_fingerprint issue
fad7be5 test: Fix intermittent p2p_finerprint issue (MarcoFalke) Pull request description: A single sync_with_ping can't be used to drop a block announcement, as the block might be sent *after* the ping has been responded to. Fix that by waiting for the block. ACKs for top commit: theStack: ACK fad7be5 Tree-SHA512: d43ba9d07273486858f65a26326cc6637ef743bf7b400e5048ba7eac266fb1893283e6503dd49f179caa1abab2977315fb70ba9fba34be9a817a74259d8e4034
1 parent 5783743 commit d667e57

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/functional/p2p_fingerprint.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def run_test(self):
118118
block_hash = int(tip, 16)
119119
self.send_block_request(block_hash, node0)
120120
self.send_header_request(block_hash, node0)
121-
node0.sync_with_ping()
121+
node0.wait_for_block(block_hash, timeout=3)
122122

123123
# Request for very old stale block should now fail
124124
self.send_block_request(stale_hash, node0)
@@ -144,5 +144,6 @@ def run_test(self):
144144
test_function = lambda: self.last_header_equals(block_hash, node0)
145145
wait_until(test_function, timeout=3)
146146

147+
147148
if __name__ == '__main__':
148149
P2PFingerprintTest().main()

0 commit comments

Comments
 (0)