Skip to content

Commit 4b6ca4a

Browse files
author
MarcoFalke
committed
Merge #20845: net: Log to net debug in MaybeDiscourageAndDisconnect except for noban and manual peers
fa55159 net: Log to net debug in MaybeDiscourageAndDisconnect except for noban and manual peers (MarcoFalke) Pull request description: The goal is to avoid local peers (e.g. untrusted peers on the local network or inbound onion peers via a local onion proxy) filling the debug log (and thus the disk). ACKs for top commit: practicalswift: ACK fa55159 vasild: ACK fa55159 Tree-SHA512: de233bf57334580f9b91f369fafd131d71c5ae25db25b09cc8fa8cbf34c0648f083c52260a6a912238751467e3c3c5f5d2309c145710753058d44a0003f88f4f
2 parents 5e4a3ca + fa55159 commit 4b6ca4a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/net_processing.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4052,7 +4052,8 @@ bool PeerManagerImpl::MaybeDiscourageAndDisconnect(CNode& pnode, Peer& peer)
40524052
if (pnode.addr.IsLocal()) {
40534053
// We disconnect local peers for bad behavior but don't discourage (since that would discourage
40544054
// all peers on the same local address)
4055-
LogPrintf("Warning: disconnecting but not discouraging local peer %d!\n", peer.m_id);
4055+
LogPrint(BCLog::NET, "Warning: disconnecting but not discouraging %s peer %d!\n",
4056+
pnode.m_inbound_onion ? "inbound onion" : "local", peer.m_id);
40564057
pnode.fDisconnect = true;
40574058
return true;
40584059
}

0 commit comments

Comments
 (0)