mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
merge bitcoin#27128: fix intermittent issue in p2p_disconnect_ban
This commit is contained in:
parent
d4b0faeae1
commit
2854a6aa5a
@ -91,7 +91,7 @@ class DisconnectBanTest(BitcoinTestFramework):
|
|||||||
self.log.info("disconnectnode: successfully disconnect node by address")
|
self.log.info("disconnectnode: successfully disconnect node by address")
|
||||||
address1 = self.nodes[0].getpeerinfo()[0]['addr']
|
address1 = self.nodes[0].getpeerinfo()[0]['addr']
|
||||||
self.nodes[0].disconnectnode(address=address1)
|
self.nodes[0].disconnectnode(address=address1)
|
||||||
self.wait_until(lambda: len(self.nodes[0].getpeerinfo()) == 1, timeout=10)
|
self.wait_until(lambda: len(self.nodes[1].getpeerinfo()) == 1, timeout=10)
|
||||||
assert not [node for node in self.nodes[0].getpeerinfo() if node['addr'] == address1]
|
assert not [node for node in self.nodes[0].getpeerinfo() if node['addr'] == address1]
|
||||||
|
|
||||||
self.log.info("disconnectnode: successfully reconnect node")
|
self.log.info("disconnectnode: successfully reconnect node")
|
||||||
@ -102,7 +102,7 @@ class DisconnectBanTest(BitcoinTestFramework):
|
|||||||
self.log.info("disconnectnode: successfully disconnect node by node id")
|
self.log.info("disconnectnode: successfully disconnect node by node id")
|
||||||
id1 = self.nodes[0].getpeerinfo()[0]['id']
|
id1 = self.nodes[0].getpeerinfo()[0]['id']
|
||||||
self.nodes[0].disconnectnode(nodeid=id1)
|
self.nodes[0].disconnectnode(nodeid=id1)
|
||||||
self.wait_until(lambda: len(self.nodes[0].getpeerinfo()) == 1, timeout=10)
|
self.wait_until(lambda: len(self.nodes[1].getpeerinfo()) == 1, timeout=10)
|
||||||
assert not [node for node in self.nodes[0].getpeerinfo() if node['id'] == id1]
|
assert not [node for node in self.nodes[0].getpeerinfo() if node['id'] == id1]
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
Loading…
Reference in New Issue
Block a user