diff options
author | Jon Atack <jon@atack.com> | 2020-07-08 09:33:30 +0200 |
---|---|---|
committer | Jon Atack <jon@atack.com> | 2020-07-11 19:41:24 +0200 |
commit | 06059b0c2a6c2db70c87a7715f8a344a13400fa1 (patch) | |
tree | a0f7c09df27c25e8a3c624f6b3ad1334670105e9 /src/net_processing.cpp | |
parent | 1d4024bca8086cceff7539dd8c15e0b7fe1cc5ea (diff) |
net: rename DEFAULT_BANSCORE_THRESHOLD to DISCOURAGEMENT_THRESHOLD
and move it from validation to net processing.
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r-- | src/net_processing.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 0e0a8a5b48..bf8849025e 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -1016,7 +1016,7 @@ unsigned int LimitOrphanTxSize(unsigned int nMaxOrphans) } /** - * Increment peer's misbehavior score. If the new value >= DEFAULT_BANSCORE_THRESHOLD, mark the node + * 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(NodeId pnode, int howmuch, const std::string& message) EXCLUSIVE_LOCKS_REQUIRED(cs_main) @@ -1030,7 +1030,7 @@ void Misbehaving(NodeId pnode, int howmuch, const std::string& message) EXCLUSIV state->nMisbehavior += howmuch; std::string message_prefixed = message.empty() ? "" : (": " + message); - if (state->nMisbehavior >= DEFAULT_BANSCORE_THRESHOLD && state->nMisbehavior - howmuch < DEFAULT_BANSCORE_THRESHOLD) + if (state->nMisbehavior >= DISCOURAGEMENT_THRESHOLD && state->nMisbehavior - howmuch < DISCOURAGEMENT_THRESHOLD) { LogPrint(BCLog::NET, "%s: %s peer=%d (%d -> %d) DISCOURAGE THRESHOLD EXCEEDED%s\n", __func__, state->name, pnode, state->nMisbehavior-howmuch, state->nMisbehavior, message_prefixed); state->m_should_discourage = true; |