Skip to content

Commit 02d8583

Browse files
committed
f error if 2 witness elements for P2TR spend
1 parent 6733344 commit 02d8583

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lightning/src/ln/channel.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7694,6 +7694,14 @@ where
76947694
),
76957695
});
76967696
}
7697+
// Bitcoin Core will not relay transactions with a taproot annex yet.
7698+
if witness.len() == 2 {
7699+
return Err(APIError::APIMisuseError {
7700+
err: format!(
7701+
"The witness for input at index {input_idx} for a P2TR spend has 2 elements (probably includes an annex). The transaction won't be relayed",
7702+
),
7703+
});
7704+
}
76977705
let sighash = cache
76987706
.taproot_key_spend_signature_hash(
76997707
input_idx,

0 commit comments

Comments
 (0)