Rename to PrecomputedTransactionData

This commit is contained in:
Pieter Wuille
2016-08-26 18:38:20 +02:00
committed by lateminer
parent d8d19c532f
commit cd30f2becb
8 changed files with 39 additions and 34 deletions

View File

@@ -84,9 +84,9 @@ int bitcoinconsensus_verify_script(const unsigned char *scriptPubKey, unsigned i
// Regardless of the verification result, the tx did not error.
set_error(err, bitcoinconsensus_ERR_OK);
CachedHashes cachedHashes(tx);
PrecomputedTransactionData txdata(tx);
CAmount amount(0);
return VerifyScript(tx.vin[nIn].scriptSig, CScript(scriptPubKey, scriptPubKey + scriptPubKeyLen), flags, TransactionSignatureChecker(&tx, nIn, amount, cachedHashes), NULL);
return VerifyScript(tx.vin[nIn].scriptSig, CScript(scriptPubKey, scriptPubKey + scriptPubKeyLen), flags, TransactionSignatureChecker(&tx, nIn, amount, txdata), NULL);
} catch (const std::exception&) {
return set_error(err, bitcoinconsensus_ERR_TX_DESERIALIZE); // Error deserializing
}