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:
1 file changed
+7
@@ -468,6 +468,13 @@ func SenderHtlcSpendRevoke(signer Signer, signDesc *SignDescriptor,
|
|||||||
func IsHtlcSpendRevoke(txIn *wire.TxIn, signDesc *SignDescriptor) (
|
func IsHtlcSpendRevoke(txIn *wire.TxIn, signDesc *SignDescriptor) (
|
||||||
bool, error) {
|
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)
|
revokeKey, err := deriveRevokePubKey(signDesc)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, err
|
return false, err
|
||||||
|
|||||||
Reference in new issue
Block a user