Skip to content

Commit 95f12de

Browse files
committed
BIP341 txdata cannot be precomputed without spent outputs
1 parent f722a9b commit 95f12de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/script/interpreter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1439,7 +1439,7 @@ void PrecomputedTransactionData::Init(const T& txTo, std::vector<CTxOut>&& spent
14391439
hashOutputs = SHA256Uint256(m_outputs_single_hash);
14401440
m_bip143_segwit_ready = true;
14411441
}
1442-
if (uses_bip341_taproot) {
1442+
if (uses_bip341_taproot && m_spent_outputs_ready) {
14431443
m_spent_amounts_single_hash = GetSpentAmountsSHA256(m_spent_outputs);
14441444
m_spent_scripts_single_hash = GetSpentScriptsSHA256(m_spent_outputs);
14451445
m_bip341_taproot_ready = true;

0 commit comments

Comments
 (0)