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