|
|
@ -1357,19 +1357,19 @@ func (s *loopOutSwap) createMuSig2SweepTxn(
|
|
|
|
|
|
|
|
|
|
|
|
var (
|
|
|
|
var (
|
|
|
|
signers [][]byte
|
|
|
|
signers [][]byte
|
|
|
|
muSig2Verion input.MuSig2Version
|
|
|
|
muSig2Version input.MuSig2Version
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
// Depending on the MuSig2 version we either pass 32 byte Schnorr
|
|
|
|
// Depending on the MuSig2 version we either pass 32 byte Schnorr
|
|
|
|
// public keys or normal 33 byte public keys.
|
|
|
|
// public keys or normal 33 byte public keys.
|
|
|
|
if s.ProtocolVersion >= loopdb.ProtocolVersionMuSig2 {
|
|
|
|
if s.ProtocolVersion >= loopdb.ProtocolVersionMuSig2 {
|
|
|
|
muSig2Verion = input.MuSig2Version100RC2
|
|
|
|
muSig2Version = input.MuSig2Version100RC2
|
|
|
|
signers = [][]byte{
|
|
|
|
signers = [][]byte{
|
|
|
|
s.HtlcKeys.SenderInternalPubKey[:],
|
|
|
|
s.HtlcKeys.SenderInternalPubKey[:],
|
|
|
|
s.HtlcKeys.ReceiverInternalPubKey[:],
|
|
|
|
s.HtlcKeys.ReceiverInternalPubKey[:],
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
muSig2Verion = input.MuSig2Version040
|
|
|
|
muSig2Version = input.MuSig2Version040
|
|
|
|
signers = [][]byte{
|
|
|
|
signers = [][]byte{
|
|
|
|
s.HtlcKeys.SenderInternalPubKey[1:],
|
|
|
|
s.HtlcKeys.SenderInternalPubKey[1:],
|
|
|
|
s.HtlcKeys.ReceiverInternalPubKey[1:],
|
|
|
|
s.HtlcKeys.ReceiverInternalPubKey[1:],
|
|
|
@ -1384,7 +1384,7 @@ func (s *loopOutSwap) createMuSig2SweepTxn(
|
|
|
|
// Now we're creating a local MuSig2 session using the receiver key's
|
|
|
|
// Now we're creating a local MuSig2 session using the receiver key's
|
|
|
|
// key locator and the htlc's root hash.
|
|
|
|
// key locator and the htlc's root hash.
|
|
|
|
musig2SessionInfo, err := s.lnd.Signer.MuSig2CreateSession(
|
|
|
|
musig2SessionInfo, err := s.lnd.Signer.MuSig2CreateSession(
|
|
|
|
ctx, muSig2Verion, &s.HtlcKeys.ClientScriptKeyLocator, signers,
|
|
|
|
ctx, muSig2Version, &s.HtlcKeys.ClientScriptKeyLocator, signers,
|
|
|
|
lndclient.MuSig2TaprootTweakOpt(htlcScript.RootHash[:], false),
|
|
|
|
lndclient.MuSig2TaprootTweakOpt(htlcScript.RootHash[:], false),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|