HomePhabricator

TEST: Replace hard-coded hex tx with classes

Description

TEST: Replace hard-coded hex tx with classes

Summary:
This adds some abstraction and make the code more readable by replacing byte operations on hex transactions by CTransaction & CTxOut objects.
The PR mentions a minor 4% increase in time for some tests, which is considered an acceptable compromise in exchange for more clarity.

The imports are not at the top of the module to avoid a circular import issue. This indicates that the util and messages modules would benefit from some refactoring.

This is a backport of Core PR15282

Test Plan: ninja check-functional-extended

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

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

Details

Provenance
Steven Roose <steven@stevenroose.org>Authored on Jan 29 2019, 10:44
PiRKCommitted on Nov 13 2020, 06:13
PiRKPushed on Nov 13 2020, 06:13
Reviewer
Restricted Project
Differential Revision
D8378: TEST: Replace hard-coded hex tx with classes
Parents
rABCfcdb64326220: [backport#16947] doc: Doxygen-friendly script/descriptor.h comments
Branches
Unknown
Tags
Unknown