HomePhabricator

test: use wait_for_{block,header} helpers in p2p_fingerprint.py

Description

test: use wait_for_{block,header} helpers in p2p_fingerprint.py

Summary:
This small PR takes use of the message receiving helper functions wait_for_block() and wait_for_header() in the test p2p_fingerprint.py. It also simplifies the checks for very old stale blocks/headers requests by getting rid of the functions last_block_equals() and last_header_equals() and rather only testing that no blocks/headers message is received at all. Unnecessary sending of requests are also removed and calls to time.sleep(...) substituted by ping syncs.

This is a backport of core#20047

Test Plan: ninja check-functional

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
Sebastian Falbesoner <sebastian.falbesoner@gmail.com>Authored on Sep 30 2020, 14:48
PiRKCommitted on Jan 11 2022, 12:34
PiRKPushed on Jan 11 2022, 12:34
Reviewer
Restricted Project
Differential Revision
D10804: test: use wait_for_{block,header} helpers in p2p_fingerprint.py
Parents
rABC952efc13f0d1: test: fix creation of std::string objects with \0s
Branches
Unknown
Tags
Unknown