[net processing] Move Misbehaving() to PeerManager

This commit is contained in:
John Newbery
2020-08-24 16:56:15 +01:00
parent aa114b1c9b
commit bb6a32ce99
3 changed files with 12 additions and 10 deletions

View File

@@ -1110,11 +1110,7 @@ unsigned int LimitOrphanTxSize(unsigned int nMaxOrphans)
return nEvicted;
}
/**
* Increment peer's misbehavior score. If the new value >= DISCOURAGEMENT_THRESHOLD, mark the node
* to be discouraged, meaning the peer might be disconnected and added to the discouragement filter.
*/
void Misbehaving(const NodeId pnode, const int howmuch, const std::string& message)
void PeerManager::Misbehaving(const NodeId pnode, const int howmuch, const std::string& message)
{
assert(howmuch > 0);