Skip to content

Commit aa8310c

Browse files
Cherry-pick <bitcoin/bitcoin#27122>
Simplicity needs this fix.
1 parent 5548997 commit aa8310c

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
@@ -2585,7 +2585,7 @@ void PrecomputedTransactionData::Init(const T& txTo, std::vector<CTxOut>&& spent
25852585
hashRangeproofs = GetRangeproofsHash(txTo);
25862586
m_bip143_segwit_ready = true;
25872587
}
2588-
if (uses_bip341_taproot) {
2588+
if (uses_bip341_taproot && m_spent_outputs_ready) {
25892589
// line copied from GetTransactionWeight() in src/consensus/validation.h
25902590
// (we cannot directly use that function for type reasons)
25912591
m_tx_weight = ::GetSerializeSize(txTo, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(txTo, PROTOCOL_VERSION);

0 commit comments

Comments
 (0)