From b39f5884ada18344d7de9953382e51b576469b8e Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Wed, 1 Mar 2023 21:46:13 -0800 Subject: [PATCH] input: update IsHtlcSpendRevoke for taproot chans For taproot channels, the revocation witness is a single sig as the keyspend path is used. --- input/script_utils.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/input/script_utils.go b/input/script_utils.go index e917c4aca..6543d7a5b 100644 --- a/input/script_utils.go +++ b/input/script_utils.go @@ -468,6 +468,13 @@ func SenderHtlcSpendRevoke(signer Signer, signDesc *SignDescriptor, func IsHtlcSpendRevoke(txIn *wire.TxIn, signDesc *SignDescriptor) ( bool, error) { + // For taproot channels, the revocation path only has a single witness, + // as that's the key spend path. + isTaproot := txscript.IsPayToTaproot(signDesc.Output.PkScript) + if isTaproot { + return len(txIn.Witness) == 1, nil + } + revokeKey, err := deriveRevokePubKey(signDesc) if err != nil { return false, err