HomePhabricator

test: use the correct DISCOURAGEMENT_THRESHOLD

Description

test: use the correct DISCOURAGEMENT_THRESHOLD

Summary:
The discouragement threshold is modified to account for the change in D6036, which caused a peer to be banned after only 10 out-of-order messages instead of 100.

Using the wrong value in this test could potentially cause the node to be banned before all messages are sent, and cause the next self.send_message(msg_verack()) to break the test, because this method fails when trying to send a message if the connection is closed.

I observed this failure while trying core#19657 (D10063), in which the message is sent a bit later in the test and the node bans the p2p connection faster.

Test Plan: test/functional/test_runner.py p2p_leak

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Subscribers: majcosta

Differential Revision: https://reviews.bitcoinabc.org/D10064

Details

Provenance
PiRKAuthored on Sep 7 2021, 12:23
PiRKPushed on Sep 7 2021, 13:53
Reviewer
Restricted Project
Differential Revision
D10064: test: use the correct DISCOURAGEMENT_THRESHOLD
Parents
rABC636042be375f: doc: Replace `hidden service` with `onion service`
Branches
Unknown
Tags
Unknown