Skip to content

Commit

Permalink
[refactor] use waiting inside disconnect_p2ps
Browse files Browse the repository at this point in the history
-Use wait_for_disconnect instead of manual
wait after calling disconnect_p2ps.
  • Loading branch information
glozow committed Jun 16, 2020
1 parent aeb9fb4 commit 9a40cfc
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
3 changes: 0 additions & 3 deletions test/functional/p2p_leak.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,6 @@ def run_test(self):

self.nodes[0].disconnect_p2ps()

# Wait until all connections are closed
wait_until(lambda: len(self.nodes[0].getpeerinfo()) == 0)

# Make sure no unexpected messages came in
assert no_version_bannode.unexpected_msg == False
assert no_version_idlenode.unexpected_msg == False
Expand Down
1 change: 0 additions & 1 deletion test/functional/p2p_node_network_limited.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ def run_test(self):
assert_equal(node1.firstAddrnServices, expected_services)

self.nodes[0].disconnect_p2ps()
node1.wait_for_disconnect()

# connect unsynced node 2 with pruned NODE_NETWORK_LIMITED peer
# because node 2 is in IBD and node 0 is a NODE_NETWORK_LIMITED peer, sync must not be possible
Expand Down

0 comments on commit 9a40cfc

Please sign in to comment.