mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-28 13:52:55 +02:00
input: use script path for revocation clause for to_local output
In this commit, we modify the to_local script to use a script path for the revocation scenario. With this change, we ensure that the internal key is always revealed which means the anchor outputs can still always be swept.
This commit is contained in:
@@ -977,7 +977,6 @@ func localCommitSweepWitGen(sigHash txscript.SigHashType,
|
||||
|
||||
return TaprootCommitSpendSuccess(
|
||||
signer, signDesc, spendTx,
|
||||
commitScriptTree.revokeKey.PubKey(),
|
||||
commitScriptTree.TapscriptTree,
|
||||
)
|
||||
}
|
||||
@@ -1000,17 +999,18 @@ func localCommitRevokeWitGen(sigHash txscript.SigHashType,
|
||||
KeyDesc: keychain.KeyDescriptor{
|
||||
PubKey: revokeKey.PubKey(),
|
||||
},
|
||||
WitnessScript: commitScriptTree.RevocationLeaf.Script,
|
||||
Output: commitScriptTree.txOut,
|
||||
HashType: sigHash,
|
||||
InputIndex: 0,
|
||||
SigHashes: hashCache,
|
||||
SignMethod: TaprootKeySpendSignMethod,
|
||||
TapTweak: commitScriptTree.TapscriptRoot,
|
||||
SignMethod: TaprootScriptSpendSignMethod,
|
||||
PrevOutputFetcher: prevOuts,
|
||||
}
|
||||
|
||||
return TaprootCommitSpendRevoke(
|
||||
signer, signDesc, spendTx,
|
||||
commitScriptTree.TapscriptTree,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user