mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
loop: use MuSig2 1.0 scheme for the new MuSig2 swaps
This commit is contained in:
parent
b47f67a6de
commit
cd91f90ed2
4 changed files with 41 additions and 66 deletions
9
swap.go
9
swap.go
|
|
@ -82,8 +82,15 @@ func GetHtlc(hash lntypes.Hash, contract *loopdb.SwapContract,
|
|||
)
|
||||
|
||||
case swap.HtlcV3:
|
||||
// Swaps that implement the new MuSig2 protocol will be expected
|
||||
// to use the 1.0RC2 MuSig2 key derivation scheme.
|
||||
muSig2Version := input.MuSig2Version040
|
||||
if contract.ProtocolVersion >= loopdb.ProtocolVersionMuSig2 {
|
||||
muSig2Version = input.MuSig2Version100RC2
|
||||
}
|
||||
|
||||
return swap.NewHtlcV3(
|
||||
input.MuSig2Version040,
|
||||
muSig2Version,
|
||||
contract.CltvExpiry,
|
||||
contract.HtlcKeys.SenderInternalPubKey,
|
||||
contract.HtlcKeys.ReceiverInternalPubKey,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue