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:
5 files changed
+53
-50
No files matched your search
@@ -78,7 +78,7 @@ class AddrTest(BitcoinTestFramework):
|
||||
def run_test(self):
|
||||
self.log.info('Check disconnection when sending sendaddrv2 after verack')
|
||||
conn = self.nodes[0].add_p2p_connection(P2PInterface())
|
||||
with self.nodes[0].assert_debug_log(['sendaddrv2 received after verack from peer=0; disconnecting']):
|
||||
with self.nodes[0].assert_debug_log(['sendaddrv2 received after verack, disconnecting peer=0']):
|
||||
conn.send_message(msg_sendaddrv2())
|
||||
conn.wait_for_disconnect()
|
||||
|
||||
|
||||
Reference in new issue
Block a user