diff --git a/src/net_processing.cpp b/src/net_processing.cpp index a19443c0f56..f45042eb77a 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -4205,7 +4205,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type, if (msg_type == NetMsgType::TX) { if (RejectIncomingTxs(pfrom)) { - LogDebug(BCLog::NET, "transaction sent in violation of protocol peer=%d\n", pfrom.GetId()); + LogDebug(BCLog::NET, "transaction sent in violation of protocol, %s", pfrom.DisconnectMsg(fLogIPs)); pfrom.fDisconnect = true; return; } @@ -5207,7 +5207,7 @@ void PeerManagerImpl::MaybeSendPing(CNode& node_to, Peer& peer, std::chrono::mic { // The ping timeout is using mocktime. To disable the check during // testing, increase -peertimeout. - LogDebug(BCLog::NET, "ping timeout: %fs peer=%d\n", 0.000001 * count_microseconds(now - peer.m_ping_start.load()), peer.m_id); + LogDebug(BCLog::NET, "ping timeout: %fs, %s", 0.000001 * count_microseconds(now - peer.m_ping_start.load()), node_to.DisconnectMsg(fLogIPs)); node_to.fDisconnect = true; return; } diff --git a/test/functional/p2p_blocksonly.py b/test/functional/p2p_blocksonly.py index b9e6dc90563..6737cc687ea 100755 --- a/test/functional/p2p_blocksonly.py +++ b/test/functional/p2p_blocksonly.py @@ -115,7 +115,7 @@ class P2PBlocksOnly(BitcoinTestFramework): self.log.info('Check that txs from P2P are rejected and result in disconnect') spendtx = self.miniwallet.create_self_transfer() - with self.nodes[0].assert_debug_log(['transaction sent in violation of protocol peer=0']): + with self.nodes[0].assert_debug_log(['transaction sent in violation of protocol, disconnecting peer=0']): self.nodes[0].p2ps[0].send_message(msg_tx(spendtx['tx'])) self.nodes[0].p2ps[0].wait_for_disconnect() assert_equal(self.nodes[0].getmempoolinfo()['size'], 0)