mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
test: Fix intermittent issue in p2p_handshake.py
If we reuse the same port when disconnecting and establishing connections again, we might hit this scenario: - disconnection is done on python side for P2PConnection - disconnection is not complete on c++ side for TestNode - we're trying to establish a new connection on same port again Prevent this scenario from happening by ensuring disconnection on c++ side for TestNode as well.
This commit is contained in:
parent
c8e3978114
commit
6b02c11d66
1 changed files with 1 additions and 0 deletions
|
@ -41,6 +41,7 @@ class P2PHandshakeTest(BitcoinTestFramework):
|
|||
peer.sync_with_ping()
|
||||
peer.peer_disconnect()
|
||||
peer.wait_for_disconnect()
|
||||
self.wait_until(lambda: len(node.getpeerinfo()) == 0)
|
||||
|
||||
def test_desirable_service_flags(self, node, service_flag_tests, desirable_service_flags, expect_disconnect):
|
||||
"""Check that connecting to a peer either fails or succeeds depending on its offered
|
||||
|
|
Loading…
Add table
Reference in a new issue