diff options
| author | MarcoFalke <[email protected]> | 2018-04-11 13:51:28 -0400 |
|---|---|---|
| committer | MarcoFalke <[email protected]> | 2018-04-11 14:59:53 -0400 |
| commit | fae58eca934b5c7165b589c3bec1751d1b432b48 (patch) | |
| tree | 5d0c8b10608dcced118dc59d7812f8498fcfc012 /src/bench | |
| parent | Merge #12920: test: Fix sign for expected values (diff) | |
| download | discoin-fae58eca934b5c7165b589c3bec1751d1b432b48.tar.xz discoin-fae58eca934b5c7165b589c3bec1751d1b432b48.zip | |
tests: Avoid copies of CTransaction
Diffstat (limited to 'src/bench')
| -rw-r--r-- | src/bench/mempool_eviction.cpp | 2 | ||||
| -rw-r--r-- | src/bench/verify_script.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/bench/mempool_eviction.cpp b/src/bench/mempool_eviction.cpp index cdda0bd9b..e05a5e3d1 100644 --- a/src/bench/mempool_eviction.cpp +++ b/src/bench/mempool_eviction.cpp @@ -9,7 +9,7 @@ #include <list> #include <vector> -static void AddTx(const CTransaction& tx, const CAmount& nFee, CTxMemPool& pool) +static void AddTx(const CMutableTransaction& tx, const CAmount& nFee, CTxMemPool& pool) { int64_t nTime = 0; unsigned int nHeight = 1; 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(); |