HomePhabricator

test: p2p_feefilter improvements (logging, refactoring, speedup)

Description

test: p2p_feefilter improvements (logging, refactoring, speedup)

Summary:

test: add logging for p2p_feefilter.py

https://github.com/bitcoin/bitcoin/pull/19564/commits/6d941923c318ce9cb2380d3e41ffb760636656a2

test: use wait_until for invs matching in p2p_feefilter.py

additionally:

-> rename function with snake_case (s/allInvsMatch/wait_for_invs_to_match)
-> move it from global namespace to the class FeefilterConn

https://github.com/bitcoin/bitcoin/pull/19564/commits/fe3f0cc44ec6301a86de48cdc3883377932e44eb

test: speedup p2p_feefilter.py by whitelisting peers (immediate tx relay)

Most of the test time is spent in wait_for_invs() after sending to addresses,
i.e. the bottleneck is in relaying transactions. By whitelisting the peers via
-whitelist, the inventory is transmissioned immediately rather than on average
every 5 seconds, speeding up the test significantly:

https://github.com/bitcoin/bitcoin/pull/19564/commits/9e7894357e296dbe0be775e1527654729dbb71b0

This is a backport of core#19564

Test Plan:
before:

TEST             | STATUS    | DURATION

p2p_feefilter.py | ✓ Passed  | 29 s

ALL              | ✓ Passed  | 29 s (accumulated)
Runtime: 21 s

after:

TEST             | STATUS    | DURATION

p2p_feefilter.py | ✓ Passed  | 4 s

ALL              | ✓ Passed  | 4 s (accumulated)

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
Sebastian Falbesoner <sebastian.falbesoner@gmail.com>Authored on Jul 21 2020, 23:49
PiRKCommitted on Wed, Sep 15, 06:20
PiRKPushed on Wed, Sep 15, 06:20
Reviewer
Restricted Project
Differential Revision
D10111: test: p2p_feefilter improvements (logging, refactoring, speedup)
Parents
rABC0128eccd0101: test: Remove confusing and broken use of wait_until global
Branches
Unknown
Tags
Unknown