Page MenuHomePhabricator

test: use the correct DISCOURAGEMENT_THRESHOLD
ClosedPublic

Authored by PiRK on Sep 7 2021, 12:31.

Details

Reviewers
majcosta
Group Reviewers
Restricted Project
Commits
rABCd6143c343692: 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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable