HomePhabricator

Speed up OP_REVERSEBYTES test significantly

Description

Speed up OP_REVERSEBYTES test significantly

Summary: Currently, the test for OP_REVERSEBYTES takes ~40s to finish. The bottleneck is that both the stack item sizes and the flag set are checked exhaustively combinatorically. This diff still checks both exhaustively, but separately, and uses a curated set of flags/test cases for each, respectively. This reduces the test execution time to around ~1s.

Test Plan:
ninja check

./src/test/test_bitcoin -t op_reversebytes_tests

Reviewers: deadalnix, O1 Bitcoin ABC, #bitcoin_abc

Reviewed By: deadalnix, O1 Bitcoin ABC, #bitcoin_abc

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

Details

Provenance
tobias_ruckAuthored on Apr 14 2020, 19:48
tobias_ruckPushed on Apr 18 2020, 08:22
Reviewer
Restricted Owners Package
Differential Revision
D5729: Speed up OP_REVERSEBYTES test significantly
Parents
rABCb93a3dba4200: Catch exception by ref in wallettool.cpp
Branches
Unknown
Tags
Unknown