aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-02-22 09:43:53 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-02-22 09:43:57 +0100
commit4b6ca4a35a121da7667f85a58dd445755b15beca (patch)
tree0867a4343b3883dd96993ca6766ad6832bb3d784 /src
parent5e4a3ca2f483b0bd8230191f16d8a8c0c45af131 (diff)
parentfa55159b9ede4a915f8ef9e5b90e3e99eadedf91 (diff)
Merge #20845: net: Log to net debug in MaybeDiscourageAndDisconnect except for noban and manual peers
fa55159b9ede4a915f8ef9e5b90e3e99eadedf91 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 fa55159b9ede4a915f8ef9e5b90e3e99eadedf91 vasild: ACK fa55159b9ede4a915f8ef9e5b90e3e99eadedf91 Tree-SHA512: de233bf57334580f9b91f369fafd131d71c5ae25db25b09cc8fa8cbf34c0648f083c52260a6a912238751467e3c3c5f5d2309c145710753058d44a0003f88f4f
Diffstat (limited to 'src')
-rw-r--r--src/net_processing.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index 198228de26..c97f7ced46 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -4052,7 +4052,8 @@ bool PeerManagerImpl::MaybeDiscourageAndDisconnect(CNode& pnode, Peer& peer)
if (pnode.addr.IsLocal()) {
// We disconnect local peers for bad behavior but don't discourage (since that would discourage
// all peers on the same local address)
- LogPrintf("Warning: disconnecting but not discouraging local peer %d!\n", peer.m_id);
+ LogPrint(BCLog::NET, "Warning: disconnecting but not discouraging %s peer %d!\n",
+ pnode.m_inbound_onion ? "inbound onion" : "local", peer.m_id);
pnode.fDisconnect = true;
return true;
}