mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-27 14:11:04 +02:00
input+lnwallet: modify musig2 interfaces use explicit optional local nonces
In this commit, we modify the musig2 interfaces to instead use an explicit value for the local nonces. Before this commit, we used the functional option, but we want to also support specifying this value over RPC for the remote signer. The functional option pattern is opaque, so we can't get the nonce value we need. To get around this, we'll just make this an explicit pointer, then map this to the functional option at the very last moment.
This commit is contained in:
@@ -260,7 +260,7 @@ func (m *MusigSession) FinalizeSession(signingNonce musig2.Nonces) error {
|
||||
m.session, err = m.signer.MuSig2CreateSession(
|
||||
input.MuSig2Version100RC2, m.localKey.KeyLocator, m.signerKeys,
|
||||
&tweakDesc, [][musig2.PubNonceSize]byte{remoteNonce.PubNonce},
|
||||
musig2.WithPreGeneratedNonce(&localNonce),
|
||||
&localNonce,
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user