mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-28 15:02:47 +02:00
Merge #19464: net: remove -banscore configuration option
06059b0c2a
net: rename DEFAULT_BANSCORE_THRESHOLD to DISCOURAGEMENT_THRESHOLD (Jon Atack)1d4024bca8
net: remove -banscore configuration option (Jon Atack) Pull request description: per https://github.com/bitcoin/bitcoin/pull/19219#issuecomment-652684340, https://github.com/bitcoin/bitcoin/pull/19219#discussion_r443074487 and https://github.com/bitcoin/bitcoin/pull/19219#issuecomment-652699592. Edit: now split into 3 straightforward PRs: - net: remove -banscore configuration option (this PR) - rpc: deprecate banscore field in getpeerinfo (#19469, *merged*) - gui: no longer display banscores (TBA in the gui repo) ACKs for top commit: MarcoFalke: review ACK06059b0c2a
📙 vasild: ACK06059b0c
Tree-SHA512: 03fad249986e0896697033fbb8ba2cbfaae7d7603b1fb2a38b3d41db697630d238623f4d732b9098c82af249ce5a1767dd432b7ca0fec10544e23d24fbd57c50
This commit is contained in:
@@ -26,7 +26,7 @@ from test_framework.util import (
|
||||
wait_until,
|
||||
)
|
||||
|
||||
banscore = 10
|
||||
DISCOURAGEMENT_THRESHOLD = 100
|
||||
|
||||
|
||||
class CLazyNode(P2PInterface):
|
||||
@@ -70,7 +70,7 @@ class CNodeNoVersionBan(CLazyNode):
|
||||
# NOTE: implementation-specific check here. Remove if bitcoind ban behavior changes
|
||||
def on_open(self):
|
||||
super().on_open()
|
||||
for i in range(banscore):
|
||||
for _ in range(DISCOURAGEMENT_THRESHOLD):
|
||||
self.send_message(msg_verack())
|
||||
|
||||
# Node that never sends a version. This one just sits idle and hopes to receive
|
||||
@@ -106,7 +106,6 @@ class P2PVersionStore(P2PInterface):
|
||||
class P2PLeakTest(BitcoinTestFramework):
|
||||
def set_test_params(self):
|
||||
self.num_nodes = 1
|
||||
self.extra_args = [['-banscore=' + str(banscore)]]
|
||||
|
||||
def run_test(self):
|
||||
no_version_bannode = self.nodes[0].add_p2p_connection(CNodeNoVersionBan(), send_version=False, wait_for_verack=False)
|
||||
|
Reference in New Issue
Block a user