Merge #19832: p2p: Put disconnecting logs into BCLog::NET category

1816327e53 p2p: Put disconnecting logs into BCLog::NET category (Hennadii Stepanov)

Pull request description:

  It's too noisy:
  ```
  $ cat debug.log | wc -l
  28529
  $ cat debug.log | grep "Disconnecting and discouraging peer" | wc -l
  10177
  ```

ACKs for top commit:
  MarcoFalke:
     noban, addnode and local peers are still unconditionally logged (as they should), but this one can go into a category, so cr-ACK 1816327e53
  practicalswift:
    ACK 1816327e53 for the reasons MarcoFalke gave above.
  ajtowns:
    ACK 1816327e53

Tree-SHA512: c312c1009090840659b2cb1364d8ad9b6ab8e742fc462aef169996d93c76c248507639a00257ed9d73a6916c01176b1793491b2305e92fdded5f9de0935b6ba6
This commit is contained in:
MarcoFalke 2020-12-07 09:07:53 +01:00
commit 1a04f45fe9
No known key found for this signature in database
GPG Key ID: D2EA4850E7528B25

View File

@ -3786,7 +3786,7 @@ bool PeerManager::MaybeDiscourageAndDisconnect(CNode& pnode)
}
// Normal case: Disconnect the peer and discourage all nodes sharing the address
LogPrintf("Disconnecting and discouraging peer %d!\n", peer_id);
LogPrint(BCLog::NET, "Disconnecting and discouraging peer %d!\n", peer_id);
if (m_banman) m_banman->Discourage(pnode.addr);
m_connman.DisconnectNode(pnode.addr);
return true;