Implement Taproot signature hashing (BIP 341)

This implements the new sighashing scheme from BIP341, with all relevant
whole-transaction values precomputed once and cached.

Includes changes to PrecomputedTransactionData by Pieter Wuille.
This commit is contained in:
Johnson Lau
2020-09-11 14:33:10 -07:00
committed by Pieter Wuille
parent 9eb590894f
commit 5de246ca81
4 changed files with 164 additions and 13 deletions

View File

@@ -1538,7 +1538,7 @@ bool CheckInputScripts(const CTransaction& tx, TxValidationState &state, const C
return true;
}
if (!txdata.m_ready) {
if (!txdata.m_spent_outputs_ready) {
std::vector<CTxOut> spent_outputs;
spent_outputs.reserve(tx.vin.size());