Skip to content

Commit 094c3be

Browse files
committed
[rpc] Remove deprecated "banscore" field from getpeerinfo
1 parent 5370533 commit 094c3be

File tree

5 files changed

+0
-35
lines changed

5 files changed

+0
-35
lines changed

src/net_processing.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,6 @@ bool PeerManager::GetNodeStateStats(NodeId nodeid, CNodeStateStats &stats) {
874874

875875
PeerRef peer = GetPeerRef(nodeid);
876876
if (peer == nullptr) return false;
877-
stats.m_misbehavior_score = WITH_LOCK(peer->m_misbehavior_mutex, return peer->m_misbehavior_score);
878877
stats.m_starting_height = peer->m_starting_height;
879878

880879
return true;

src/net_processing.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ static const bool DEFAULT_PEERBLOCKFILTERS = false;
3333
static const int DISCOURAGEMENT_THRESHOLD{100};
3434

3535
struct CNodeStateStats {
36-
int m_misbehavior_score = 0;
3736
int nSyncHeight = -1;
3837
int nCommonHeight = -1;
3938
int m_starting_height = -1;

src/rpc/net.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ static RPCHelpMan getpeerinfo()
131131
{RPCResult::Type::STR, "connection_type", "Type of connection: \n" + Join(CONNECTION_TYPE_DOC, ",\n") + ".\n"
132132
"Please note this output is unlikely to be stable in upcoming releases as we iterate to\n"
133133
"best capture connection behaviors."},
134-
{RPCResult::Type::NUM, "banscore", "The ban score (DEPRECATED, returned only if config option -deprecatedrpc=banscore is passed)"},
135134
{RPCResult::Type::NUM, "startingheight", "The starting height (block) of the peer"},
136135
{RPCResult::Type::NUM, "synced_headers", "The last header we have in common with this peer"},
137136
{RPCResult::Type::NUM, "synced_blocks", "The last block we have in common with this peer"},
@@ -223,10 +222,6 @@ static RPCHelpMan getpeerinfo()
223222
obj.pushKV("bip152_hb_to", stats.m_bip152_highbandwidth_to);
224223
obj.pushKV("bip152_hb_from", stats.m_bip152_highbandwidth_from);
225224
if (fStateStats) {
226-
if (IsDeprecatedRPCEnabled("banscore")) {
227-
// banscore is deprecated in v0.21 for removal in v0.22
228-
obj.pushKV("banscore", statestats.m_misbehavior_score);
229-
}
230225
obj.pushKV("startingheight", statestats.m_starting_height);
231226
obj.pushKV("synced_headers", statestats.nSyncHeight);
232227
obj.pushKV("synced_blocks", statestats.nCommonHeight);

test/functional/rpc_getpeerinfo_deprecation.py

Lines changed: 0 additions & 27 deletions
This file was deleted.

test/functional/test_runner.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,6 @@
279279
'feature_config_args.py',
280280
'feature_settings.py',
281281
'rpc_getdescriptorinfo.py',
282-
'rpc_getpeerinfo_deprecation.py',
283282
'rpc_help.py',
284283
'feature_help.py',
285284
'feature_shutdown.py',

0 commit comments

Comments
 (0)