mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-01-18 21:35:24 +01:00
input: update IsHtlcSpendRevoke for taproot chans
For taproot channels, the revocation witness is a single sig as the keyspend path is used.
This commit is contained in:
parent
995e6cd66b
commit
b39f5884ad
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user