diff options
| author | Sebastian Falbesoner <[email protected]> | 2019-10-18 02:05:05 +0200 |
|---|---|---|
| committer | Sebastian Falbesoner <[email protected]> | 2019-10-23 01:59:32 +0200 |
| commit | a0fc0764763329df2c4b11a4e22715ccfc0cf7d3 (patch) | |
| tree | 2faf74abfb0cd38ef1abb12a68aef0a68577d2d8 /src/Makefile.bench.include | |
| parent | Merge #16597: Travis: run full test suite on native macOS (diff) | |
| download | discoin-a0fc0764763329df2c4b11a4e22715ccfc0cf7d3.tar.xz discoin-a0fc0764763329df2c4b11a4e22715ccfc0cf7d3.zip | |
refactor: test/bench: dedup Build{Crediting,Spending}Transaction()
prototypes used in src/test/script_tests.cpp:
- CMutableTransaction BuildCreditingTransaction(const CScript& scriptPubKey, int nValue = 0);
- CMutableTransaction BuildSpendingTransaction(const CScript& scriptSig, const CScriptWitness& scriptWitness, const CTransaction& txCredit);
prototypes used in bench/verify_script.cpp:
- CMutableTransaction BuildCreditingTransaction(const CScript& scriptPubKey);
- CMutableTransaction BuildSpendingTransaction(const CScript& scriptSig, const CMutableTransaction& txCredit);
The more generic versions from the script tests are moved into a new file pair
transaction_utils.cpp/h and the calls are adapted accordingly in the
verify_script benchmark (passing the nValue of 1 explicitely for
BuildCreditingTransaction(), passing empty scriptWitness explicitely and
converting txCredit parameter to CTransaction in BuildSpendingTransaction()).
Diffstat (limited to 'src/Makefile.bench.include')
| -rw-r--r-- | src/Makefile.bench.include | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Makefile.bench.include b/src/Makefile.bench.include index e421b377a..38143e32b 100644 --- a/src/Makefile.bench.include +++ b/src/Makefile.bench.include @@ -39,6 +39,8 @@ bench_bench_bitcoin_SOURCES = \ bench/lockedpool.cpp \ bench/poly1305.cpp \ bench/prevector.cpp \ + test/lib/transaction_utils.h \ + test/lib/transaction_utils.cpp \ test/setup_common.h \ test/setup_common.cpp \ test/util.h \ |