aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter Wuille <pieter@wuille.net>2023-02-17 16:29:49 -0500
committerPieter Wuille <pieter@wuille.net>2023-02-17 16:29:49 -0500
commit95f12de92505522a32ba58acd5251c69e602d160 (patch)
treee477959b28a0f9507c09a78bb75be26c7735db59
parentf722a9bd132222d9d5cd503b5af25c905b205cdb (diff)
downloadbitcoin-95f12de92505522a32ba58acd5251c69e602d160.tar.xz
BIP341 txdata cannot be precomputed without spent outputs
-rw-r--r--src/script/interpreter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index 03b157a847..5f4a1aceb2 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -1439,7 +1439,7 @@ void PrecomputedTransactionData::Init(const T& txTo, std::vector<CTxOut>&& spent
hashOutputs = SHA256Uint256(m_outputs_single_hash);
m_bip143_segwit_ready = true;
}
- if (uses_bip341_taproot) {
+ if (uses_bip341_taproot && m_spent_outputs_ready) {
m_spent_amounts_single_hash = GetSpentAmountsSHA256(m_spent_outputs);
m_spent_scripts_single_hash = GetSpentScriptsSHA256(m_spent_outputs);
m_bip341_taproot_ready = true;