diff options
author | Amiti Uttarwar <amiti@uttarwar.org> | 2020-12-22 16:54:18 -0800 |
---|---|---|
committer | Amiti Uttarwar <amiti@uttarwar.org> | 2020-12-26 13:30:08 -0800 |
commit | 094c3beaa47c909070607e94f2544ed1472ddb17 (patch) | |
tree | 03dc369769618402b9df163860cb47a99692ef22 /src | |
parent | 537053336fbc1b633e7c99286c3e3492eaca1e9d (diff) |
[rpc] Remove deprecated "banscore" field from getpeerinfo
Diffstat (limited to 'src')
-rw-r--r-- | src/net_processing.cpp | 1 | ||||
-rw-r--r-- | src/net_processing.h | 1 | ||||
-rw-r--r-- | src/rpc/net.cpp | 5 |
3 files changed, 0 insertions, 7 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 838955a528..c5ea2dc85f 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -874,7 +874,6 @@ bool PeerManager::GetNodeStateStats(NodeId nodeid, CNodeStateStats &stats) { PeerRef peer = GetPeerRef(nodeid); if (peer == nullptr) return false; - stats.m_misbehavior_score = WITH_LOCK(peer->m_misbehavior_mutex, return peer->m_misbehavior_score); stats.m_starting_height = peer->m_starting_height; return true; diff --git a/src/net_processing.h b/src/net_processing.h index f1f01f9139..b8caa4369c 100644 --- a/src/net_processing.h +++ b/src/net_processing.h @@ -33,7 +33,6 @@ static const bool DEFAULT_PEERBLOCKFILTERS = false; static const int DISCOURAGEMENT_THRESHOLD{100}; struct CNodeStateStats { - int m_misbehavior_score = 0; int nSyncHeight = -1; int nCommonHeight = -1; int m_starting_height = -1; diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp index 66e3202547..7b23e8cfdc 100644 --- a/src/rpc/net.cpp +++ b/src/rpc/net.cpp @@ -131,7 +131,6 @@ static RPCHelpMan getpeerinfo() {RPCResult::Type::STR, "connection_type", "Type of connection: \n" + Join(CONNECTION_TYPE_DOC, ",\n") + ".\n" "Please note this output is unlikely to be stable in upcoming releases as we iterate to\n" "best capture connection behaviors."}, - {RPCResult::Type::NUM, "banscore", "The ban score (DEPRECATED, returned only if config option -deprecatedrpc=banscore is passed)"}, {RPCResult::Type::NUM, "startingheight", "The starting height (block) of the peer"}, {RPCResult::Type::NUM, "synced_headers", "The last header we have in common with this peer"}, {RPCResult::Type::NUM, "synced_blocks", "The last block we have in common with this peer"}, @@ -223,10 +222,6 @@ static RPCHelpMan getpeerinfo() obj.pushKV("bip152_hb_to", stats.m_bip152_highbandwidth_to); obj.pushKV("bip152_hb_from", stats.m_bip152_highbandwidth_from); if (fStateStats) { - if (IsDeprecatedRPCEnabled("banscore")) { - // banscore is deprecated in v0.21 for removal in v0.22 - obj.pushKV("banscore", statestats.m_misbehavior_score); - } obj.pushKV("startingheight", statestats.m_starting_height); obj.pushKV("synced_headers", statestats.nSyncHeight); obj.pushKV("synced_blocks", statestats.nCommonHeight); |