aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/net_processing.cpp1
-rw-r--r--src/net_processing.h1
-rw-r--r--src/rpc/net.cpp5
-rwxr-xr-xtest/functional/rpc_getpeerinfo_deprecation.py27
-rwxr-xr-xtest/functional/test_runner.py1
5 files changed, 0 insertions, 35 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);
diff --git a/test/functional/rpc_getpeerinfo_deprecation.py b/test/functional/rpc_getpeerinfo_deprecation.py
deleted file mode 100755
index bde2058464..0000000000
--- a/test/functional/rpc_getpeerinfo_deprecation.py
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env python3
-# Copyright (c) 2020 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-"""Test deprecation of getpeerinfo RPC fields."""
-
-from test_framework.test_framework import BitcoinTestFramework
-
-
-class GetpeerinfoDeprecationTest(BitcoinTestFramework):
- def set_test_params(self):
- self.num_nodes = 2
- self.extra_args = [[], ["-deprecatedrpc=banscore"]]
-
- def run_test(self):
- self.test_banscore_deprecation()
-
- def test_banscore_deprecation(self):
- self.log.info("Test getpeerinfo by default no longer returns a banscore field")
- assert "banscore" not in self.nodes[0].getpeerinfo()[0].keys()
-
- self.log.info("Test getpeerinfo returns banscore with -deprecatedrpc=banscore")
- assert "banscore" in self.nodes[1].getpeerinfo()[0].keys()
-
-
-if __name__ == "__main__":
- GetpeerinfoDeprecationTest().main()
diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py
index 5b3db282e1..261c1f0a1b 100755
--- a/test/functional/test_runner.py
+++ b/test/functional/test_runner.py
@@ -279,7 +279,6 @@ BASE_SCRIPTS = [
'feature_config_args.py',
'feature_settings.py',
'rpc_getdescriptorinfo.py',
- 'rpc_getpeerinfo_deprecation.py',
'rpc_help.py',
'feature_help.py',
'feature_shutdown.py',