diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2016-08-04 02:49:16 +0200 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2016-12-04 23:47:12 -0800 |
commit | f6fb7acda4aefd01b8ef6cd77063bfc0c4f4ab36 (patch) | |
tree | 311a5d4ee2b12057eb6cab17a0226f17cdc53eef /src/script/bitcoinconsensus.cpp | |
parent | d04aebaec7bbf4095bd4f6a715eb6ee834857115 (diff) |
Move CTxInWitness inside CTxIn
Diffstat (limited to 'src/script/bitcoinconsensus.cpp')
-rw-r--r-- | src/script/bitcoinconsensus.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/script/bitcoinconsensus.cpp b/src/script/bitcoinconsensus.cpp index 036d6ca7bf..be7fa5d3b7 100644 --- a/src/script/bitcoinconsensus.cpp +++ b/src/script/bitcoinconsensus.cpp @@ -93,8 +93,9 @@ static int verify_script(const unsigned char *scriptPubKey, unsigned int scriptP // Regardless of the verification result, the tx did not error. set_error(err, bitcoinconsensus_ERR_OK); + PrecomputedTransactionData txdata(tx); - return VerifyScript(tx.vin[nIn].scriptSig, CScript(scriptPubKey, scriptPubKey + scriptPubKeyLen), nIn < tx.wit.vtxinwit.size() ? &tx.wit.vtxinwit[nIn].scriptWitness : NULL, flags, TransactionSignatureChecker(&tx, nIn, amount, txdata), NULL); + return VerifyScript(tx.vin[nIn].scriptSig, CScript(scriptPubKey, scriptPubKey + scriptPubKeyLen), &tx.vin[nIn].scriptWitness, flags, TransactionSignatureChecker(&tx, nIn, amount, txdata), NULL); } catch (const std::exception&) { return set_error(err, bitcoinconsensus_ERR_TX_DESERIALIZE); // Error deserializing } |