mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-09 14:18:58 +02:00
tests: Avoid copies of CTransaction
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user