diff options
author | Jon Atack <jon@atack.com> | 2020-07-08 09:32:09 +0200 |
---|---|---|
committer | Jon Atack <jon@atack.com> | 2020-07-11 19:41:21 +0200 |
commit | 1d4024bca8086cceff7539dd8c15e0b7fe1cc5ea (patch) | |
tree | 3cb640eb7860718367192cef40763be65746e419 /src/net_processing.cpp | |
parent | 42fe6aad326f62c7e6ea12ee873149257f67ce5d (diff) | |
download | bitcoin-1d4024bca8086cceff7539dd8c15e0b7fe1cc5ea.tar.xz |
net: remove -banscore configuration option
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r-- | src/net_processing.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp index bfc60b18f9..0e0a8a5b48 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -1016,7 +1016,8 @@ unsigned int LimitOrphanTxSize(unsigned int nMaxOrphans) } /** - * Increment peer's misbehavior score. If the new value surpasses banscore (specified on startup or by default), mark node to be discouraged, meaning the peer might be disconnected & added to the discouragement filter. + * Increment peer's misbehavior score. If the new value >= DEFAULT_BANSCORE_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) { @@ -1028,9 +1029,8 @@ void Misbehaving(NodeId pnode, int howmuch, const std::string& message) EXCLUSIV return; state->nMisbehavior += howmuch; - int banscore = gArgs.GetArg("-banscore", DEFAULT_BANSCORE_THRESHOLD); std::string message_prefixed = message.empty() ? "" : (": " + message); - if (state->nMisbehavior >= banscore && state->nMisbehavior - howmuch < banscore) + if (state->nMisbehavior >= DEFAULT_BANSCORE_THRESHOLD && state->nMisbehavior - howmuch < DEFAULT_BANSCORE_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; |