aboutsummaryrefslogtreecommitdiff
path: root/src/bench
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-04-11 13:51:28 -0400
committerMarcoFalke <falke.marco@gmail.com>2018-04-11 14:59:53 -0400
commitfae58eca934b5c7165b589c3bec1751d1b432b48 (patch)
tree5d0c8b10608dcced118dc59d7812f8498fcfc012 /src/bench
parentb1fdfc1a8c072f798305f21d5e69207c9e1bed89 (diff)
tests: Avoid copies of CTransaction
Diffstat (limited to 'src/bench')
-rw-r--r--src/bench/mempool_eviction.cpp2
-rw-r--r--src/bench/verify_script.cpp2
2 files changed, 2 insertions, 2 deletions
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 <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 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();