diff options
author | Martin Zumsande <mzumsande@gmail.com> | 2023-01-27 15:28:11 -0500 |
---|---|---|
committer | Martin Zumsande <mzumsande@gmail.com> | 2023-01-27 15:28:21 -0500 |
commit | 6548ba68e85298c01b983c2392aab86e88e447d3 (patch) | |
tree | 4acc4f9a98d84c85a4338efdf4d9225fe71f5d4c /test/functional/p2p_ibd_stalling.py | |
parent | 9a288430df93ff0124faac1add73da5105f16898 (diff) |
test: fix intermittent errors in p2p_ibd_stalling.py
Using is_connected instead of num_test_p2p_connections
ensures that python has taken notice that the p2p was
disconnected.
Diffstat (limited to 'test/functional/p2p_ibd_stalling.py')
-rwxr-xr-x | test/functional/p2p_ibd_stalling.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/p2p_ibd_stalling.py b/test/functional/p2p_ibd_stalling.py index 9bd07be7b9..aca98ceb3f 100755 --- a/test/functional/p2p_ibd_stalling.py +++ b/test/functional/p2p_ibd_stalling.py @@ -115,7 +115,7 @@ class P2PIBDStallingTest(BitcoinTestFramework): self.mocktime += 2 node.setmocktime(self.mocktime) - self.wait_until(lambda: node.num_test_p2p_connections() == NUM_PEERS - 2) + self.wait_until(lambda: sum(x.is_connected for x in node.p2ps) == NUM_PEERS - 2) self.wait_until(lambda: self.is_block_requested(peers, stall_block)) self.all_sync_send_with_ping(peers) @@ -128,7 +128,7 @@ class P2PIBDStallingTest(BitcoinTestFramework): self.mocktime += 2 node.setmocktime(self.mocktime) - self.wait_until(lambda: node.num_test_p2p_connections() == NUM_PEERS - 3) + self.wait_until(lambda: sum(x.is_connected for x in node.p2ps) == NUM_PEERS - 3) self.wait_until(lambda: self.is_block_requested(peers, stall_block)) self.all_sync_send_with_ping(peers) |