HomePhabricator

Use std::vector API for construction of test data.

Description

Use std::vector API for construction of test data.

Summary:

For constructing test scripts, use std::vector and, in particular,
std::vector::insert to insert 20 zero bytes rather than listing the full
array of bytes explicitly. This makes the code easier to read and makes
it immediately obvious what the structure of the data is, without having
to count the zeros to understand it.

This is a backport of Core PR15099 and PR17254

PR17254 adds back opcodes lost in the fist PR.

Test Plan: ninja && ninja check

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, jasonbcox

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, jasonbcox

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

Details

Provenance
Daniel Kraft <d@domob.eu>Authored on Nov 2 2020, 19:29
PiRKCommitted on Nov 2 2020, 19:33
abc-botPushed on Nov 2 2020, 19:33
Reviewer
Restricted Owners Package
Differential Revision
D8236: Use std::vector API for construction of test data.
Parents
rABCccf7c08cbf7e: test: Bump timeouts to accomodate really slow disks
Branches
Unknown
Tags
Unknown