aboutsummaryrefslogtreecommitdiff
path: root/src/script/bitcoinconsensus.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2016-12-21 14:04:03 +0100
committerWladimir J. van der Laan <[email protected]>2016-12-21 14:04:06 +0100
commite8cfe1ee2d01c493b758a67ad14707dca15792ea (patch)
tree8164f54ddbb171d62bb9bf54949c18a06e5e40dc /src/script/bitcoinconsensus.cpp
parentMerge #9308: [test] Add CCoinsViewCache Access/Modify/Write tests (diff)
parentMove CTxInWitness inside CTxIn (diff)
downloaddiscoin-e8cfe1ee2d01c493b758a67ad14707dca15792ea.tar.xz
discoin-e8cfe1ee2d01c493b758a67ad14707dca15792ea.zip
Merge #8589: Inline CTxInWitness inside CTxIn
f6fb7ac Move CTxInWitness inside CTxIn (Pieter Wuille)
Diffstat (limited to 'src/script/bitcoinconsensus.cpp')
-rw-r--r--src/script/bitcoinconsensus.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/script/bitcoinconsensus.cpp b/src/script/bitcoinconsensus.cpp
index 036d6ca7b..be7fa5d3b 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
}