mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
merge bitcoin#26854: Fix intermittent timeout in p2p_permissions.py
This commit is contained in:
parent
892e329ada
commit
d4b0faeae1
@ -710,6 +710,10 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
|
|||||||
self.wait_until(lambda: sum(peer['version'] != 0 for peer in to_connection.getpeerinfo()) == to_num_peers)
|
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 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)
|
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):
|
def disconnect_nodes(self, a, b):
|
||||||
# A node cannot disconnect from itself, bail out early
|
# A node cannot disconnect from itself, bail out early
|
||||||
|
Loading…
Reference in New Issue
Block a user