mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
swap: pass in MuSig2 version when creating taproot HTLCs
This commit adds the MuSig2 version as an input parameter when creating Taproot htlcs. This will allow us to create both old and new MuSig2 Taproot HTLCs correctly.
This commit is contained in:
parent
476f47275b
commit
e8cfe4cea9
5 changed files with 73 additions and 31 deletions
2
swap.go
2
swap.go
|
|
@ -8,6 +8,7 @@ import (
|
|||
"github.com/lightninglabs/lndclient"
|
||||
"github.com/lightninglabs/loop/loopdb"
|
||||
"github.com/lightninglabs/loop/swap"
|
||||
"github.com/lightningnetwork/lnd/input"
|
||||
"github.com/lightningnetwork/lnd/lntypes"
|
||||
)
|
||||
|
||||
|
|
@ -82,6 +83,7 @@ func GetHtlc(hash lntypes.Hash, contract *loopdb.SwapContract,
|
|||
|
||||
case swap.HtlcV3:
|
||||
return swap.NewHtlcV3(
|
||||
input.MuSig2Version040,
|
||||
contract.CltvExpiry, contract.SenderKey,
|
||||
contract.ReceiverKey, contract.SenderKey,
|
||||
contract.ReceiverKey, hash,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue