diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-12-21 14:04:03 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-12-21 14:04:06 +0100 |
commit | e8cfe1ee2d01c493b758a67ad14707dca15792ea (patch) | |
tree | 8164f54ddbb171d62bb9bf54949c18a06e5e40dc /src/bench/verify_script.cpp | |
parent | 0698639a38069cee268f764e7b732d67622fb3df (diff) | |
parent | f6fb7acda4aefd01b8ef6cd77063bfc0c4f4ab36 (diff) |
Merge #8589: Inline CTxInWitness inside CTxIn
f6fb7ac Move CTxInWitness inside CTxIn (Pieter Wuille)
Diffstat (limited to 'src/bench/verify_script.cpp')
-rw-r--r-- | src/bench/verify_script.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/bench/verify_script.cpp b/src/bench/verify_script.cpp index 91b8c44472..bf04f90e0e 100644 --- a/src/bench/verify_script.cpp +++ b/src/bench/verify_script.cpp @@ -36,7 +36,6 @@ static CMutableTransaction BuildSpendingTransaction(const CScript& scriptSig, co txSpend.nLockTime = 0; txSpend.vin.resize(1); txSpend.vout.resize(1); - txSpend.wit.vtxinwit.resize(1); txSpend.vin[0].prevout.hash = txCredit.GetHash(); txSpend.vin[0].prevout.n = 0; txSpend.vin[0].scriptSig = scriptSig; @@ -68,7 +67,7 @@ static void VerifyScriptBench(benchmark::State& state) CScript witScriptPubkey = CScript() << OP_DUP << OP_HASH160 << ToByteVector(pubkeyHash) << OP_EQUALVERIFY << OP_CHECKSIG; CTransaction txCredit = BuildCreditingTransaction(scriptPubKey); CMutableTransaction txSpend = BuildSpendingTransaction(scriptSig, txCredit); - CScriptWitness& witness = txSpend.wit.vtxinwit[0].scriptWitness; + CScriptWitness& witness = txSpend.vin[0].scriptWitness; witness.stack.emplace_back(); key.Sign(SignatureHash(witScriptPubkey, txSpend, 0, SIGHASH_ALL, txCredit.vout[0].nValue, SIGVERSION_WITNESS_V0), witness.stack.back(), 0); witness.stack.back().push_back(static_cast<unsigned char>(SIGHASH_ALL)); @@ -80,7 +79,7 @@ static void VerifyScriptBench(benchmark::State& state) bool success = VerifyScript( txSpend.vin[0].scriptSig, txCredit.vout[0].scriptPubKey, - &txSpend.wit.vtxinwit[0].scriptWitness, + &txSpend.vin[0].scriptWitness, flags, MutableTransactionSignatureChecker(&txSpend, 0, txCredit.vout[0].nValue), &err); |