Skip to content

Commit

Permalink
merge bitcoin#26854: Fix intermittent timeout in p2p_permissions.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kwvg committed Oct 2, 2024
1 parent 892e329 commit d4b0fae
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/functional/test_framework/test_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,10 @@ def connect_nodes(self, a, b):
self.wait_until(lambda: sum(peer['version'] != 0 for peer in to_connection.getpeerinfo()) == to_num_peers)
self.wait_until(lambda: sum(peer['bytesrecv_per_msg'].pop('verack', 0) == 24 for peer in from_connection.getpeerinfo()) == from_num_peers)
self.wait_until(lambda: sum(peer['bytesrecv_per_msg'].pop('verack', 0) == 24 for peer in to_connection.getpeerinfo()) == to_num_peers)
# The message bytes are counted before processing the message, so make
# sure it was fully processed by waiting for a ping.
self.wait_until(lambda: sum(peer["bytesrecv_per_msg"].pop("pong", 0) >= 32 for peer in from_connection.getpeerinfo()) == from_num_peers)
self.wait_until(lambda: sum(peer["bytesrecv_per_msg"].pop("pong", 0) >= 32 for peer in to_connection.getpeerinfo()) == to_num_peers)

def disconnect_nodes(self, a, b):
# A node cannot disconnect from itself, bail out early
Expand Down

0 comments on commit d4b0fae

Please sign in to comment.