From fae58eca934b5c7165b589c3bec1751d1b432b48 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Wed, 11 Apr 2018 13:51:28 -0400 Subject: tests: Avoid copies of CTransaction --- src/bench/mempool_eviction.cpp | 2 +- src/bench/verify_script.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/bench') diff --git a/src/bench/mempool_eviction.cpp b/src/bench/mempool_eviction.cpp index cdda0bd9be..e05a5e3d1e 100644 --- a/src/bench/mempool_eviction.cpp +++ b/src/bench/mempool_eviction.cpp @@ -9,7 +9,7 @@ #include #include -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 705fa368a5..4100519d48 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(); -- cgit v1.2.3