Page MenuHomePhabricator

[Backport]test: impl. of msg_merkleblock and wait_for_merkleblock

Authored by PiRK on Thu, Sep 24, 11:22.


Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
rABC171445f9f225: [Backport]test: impl. of msg_merkleblock and wait_for_merkleblock

Implements the missing initialization/serialization methods for
msg_merkleblock, based on the already present class CMerkleBlock.
Also changes the method wait_for_merkleblock() to be more precise by waiting
for a merkleblock with a specified blockhash instead of an arbitrary one.

In the BIP37 test, this new method is used to make the test of
receiving merkleblock and tx if a filter is set to be more precise, by checking
if they also arrive in the right order.

The interfaces for the methods wait_for_header() and wait_for_merkleblock() are
changed to take a hex string instead of an integer, improving type safety and
removing the burden from the caller to always do the transformation via
int(...). As suggested by MarcoFalke in

This is a backport of Bitcoin Core PR18593

Test Plan

ninja check-functional

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Owners added a reviewer: Restricted Owners Package.Thu, Sep 24, 11:22
PiRK requested review of this revision.Thu, Sep 24, 11:22

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

This revision is now accepted and ready to land.Thu, Sep 24, 11:46