mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-01-19 05:45:21 +01:00
lnwallet: export GenTaprootHtlcScript
This commit is contained in:
parent
cf2174fc2d
commit
f0648e24a5
@ -1075,9 +1075,9 @@ func genSegwitV0HtlcScript(chanType channeldb.ChannelType,
|
|||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// genTaprootHtlcScript generates the HTLC scripts for a taproot+musig2
|
// GenTaprootHtlcScript generates the HTLC scripts for a taproot+musig2
|
||||||
// channel.
|
// channel.
|
||||||
func genTaprootHtlcScript(isIncoming bool, whoseCommit lntypes.ChannelParty,
|
func GenTaprootHtlcScript(isIncoming bool, whoseCommit lntypes.ChannelParty,
|
||||||
timeout uint32, rHash [32]byte, keyRing *CommitmentKeyRing,
|
timeout uint32, rHash [32]byte, keyRing *CommitmentKeyRing,
|
||||||
) (*input.HtlcScriptTree, error) {
|
) (*input.HtlcScriptTree, error) {
|
||||||
|
|
||||||
@ -1138,8 +1138,7 @@ func genTaprootHtlcScript(isIncoming bool, whoseCommit lntypes.ChannelParty,
|
|||||||
// along side the multiplexer.
|
// along side the multiplexer.
|
||||||
func genHtlcScript(chanType channeldb.ChannelType, isIncoming bool,
|
func genHtlcScript(chanType channeldb.ChannelType, isIncoming bool,
|
||||||
whoseCommit lntypes.ChannelParty, timeout uint32, rHash [32]byte,
|
whoseCommit lntypes.ChannelParty, timeout uint32, rHash [32]byte,
|
||||||
keyRing *CommitmentKeyRing,
|
keyRing *CommitmentKeyRing) (input.ScriptDescriptor, error) {
|
||||||
) (input.ScriptDescriptor, error) {
|
|
||||||
|
|
||||||
if !chanType.IsTaproot() {
|
if !chanType.IsTaproot() {
|
||||||
return genSegwitV0HtlcScript(
|
return genSegwitV0HtlcScript(
|
||||||
@ -1148,7 +1147,7 @@ func genHtlcScript(chanType channeldb.ChannelType, isIncoming bool,
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
return genTaprootHtlcScript(
|
return GenTaprootHtlcScript(
|
||||||
isIncoming, whoseCommit, timeout, rHash, keyRing,
|
isIncoming, whoseCommit, timeout, rHash, keyRing,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user