Page MenuHomePhabricator

TEST: Replace hard-coded hex tx with classes
ClosedPublic

Authored by PiRK on Nov 12 2020, 16:40.

Details

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

Diff Detail

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