This commit is contained in:
Boris Nagaev 2026-08-12 12:22:13 +00:00 committed by GitHub
commit 89b034c4f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 192 additions and 10 deletions

View file

@ -6,7 +6,6 @@ import (
"fmt"
"testing"
"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcd/wire"
"github.com/lightninglabs/loop/test"
@ -28,9 +27,12 @@ func TestStaticAddressScript(t *testing.T) {
clientPrivKey, clientPubKey := test.CreateKey(1)
serverPrivKey, serverPubKey := test.CreateKey(2)
var clientKey, serverKey [32]byte
copy(clientKey[:], clientPrivKey.Serialize())
copy(serverKey[:], serverPrivKey.Serialize())
// Keys used for the Musig2 session.
privKeys := []*btcec.PrivateKey{clientPrivKey, serverPrivKey}
pubKeys := []*btcec.PublicKey{clientPubKey, serverPubKey}
privKeys := [][32]byte{clientKey, serverKey}
// Create a new static address.
staticAddress, err := NewStaticAddress(
@ -91,7 +93,7 @@ func TestStaticAddressScript(t *testing.T) {
}
sig, err := utils.MuSig2Sign(
version, privKeys, pubKeys, tweak, msg,
version, privKeys, tweak, msg,
)
require.NoError(t, err)