diff options
| author | MarcoFalke <[email protected]> | 2018-04-17 13:25:34 -0400 |
|---|---|---|
| committer | MarcoFalke <[email protected]> | 2018-04-17 13:28:12 -0400 |
| commit | 6b46288a0853621bc911c26bb87bba22521059e7 (patch) | |
| tree | 279c5ade6cebcfd997a480a072d860485dece10c /src/bench/verify_script.cpp | |
| parent | Merge #12982: Fix inconsistent namespace formatting guidelines (diff) | |
| parent | tests: Avoid copies of CTransaction (diff) | |
| download | discoin-6b46288a0853621bc911c26bb87bba22521059e7.tar.xz discoin-6b46288a0853621bc911c26bb87bba22521059e7.zip | |
Merge #12949: tests: Avoid copies of CTransaction
fae58eca93 tests: Avoid copies of CTransaction (MarcoFalke)
Pull request description:
Avoid the copy (or move) constructor of `CTransaction` in test code, whereever a simple reference can be used instead.
Tree-SHA512: 8ef2077a277d6182996f4671722fdc01a90909ae7431c1e52604aab8ed028910615028caf9b4cb07a9b15fdc04939dea2209cc3189dde7d38271256d9fe1076c
Diffstat (limited to 'src/bench/verify_script.cpp')
| -rw-r--r-- | src/bench/verify_script.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bench/verify_script.cpp b/src/bench/verify_script.cpp index 705fa368a..4100519d4 100644 --- a/src/bench/verify_script.cpp +++ b/src/bench/verify_script.cpp @@ -71,7 +71,7 @@ static void VerifyScriptBench(benchmark::State& state) CScript scriptPubKey = CScript() << witnessversion << ToByteVector(pubkeyHash); CScript scriptSig; CScript witScriptPubkey = CScript() << OP_DUP << OP_HASH160 << ToByteVector(pubkeyHash) << OP_EQUALVERIFY << OP_CHECKSIG; - CTransaction txCredit = BuildCreditingTransaction(scriptPubKey); + const CMutableTransaction& txCredit = BuildCreditingTransaction(scriptPubKey); CMutableTransaction txSpend = BuildSpendingTransaction(scriptSig, txCredit); CScriptWitness& witness = txSpend.vin[0].scriptWitness; witness.stack.emplace_back(); |