mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-12 13:35:09 +02:00
net_processing: use CNode::DisconnectMsg helper
This is not a pure refactor: 1. It slightly changes the log messages, as reflected in the test changes 2. It adds the IP address to all disconnect logging (when fLogIPs is set)
This commit is contained in:
@ -172,7 +172,7 @@ class P2PLeakTest(BitcoinTestFramework):
|
||||
|
||||
self.log.info('Check that old peers are disconnected')
|
||||
p2p_old_peer = self.nodes[0].add_p2p_connection(P2PInterface(), send_version=False, wait_for_verack=False)
|
||||
with self.nodes[0].assert_debug_log(["using obsolete version 31799; disconnecting"]):
|
||||
with self.nodes[0].assert_debug_log(["using obsolete version 31799, disconnecting peer=5"]):
|
||||
p2p_old_peer.send_message(self.create_old_version(31799))
|
||||
p2p_old_peer.wait_for_disconnect()
|
||||
|
||||
|
Reference in New Issue
Block a user