mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-26 01:33:02 +01:00
htlcswitch: remove call to InitRemoteMusigNonces
In this commit, we remove the internal call to `InitRemoteMusigNonces`. We don't need this since when we go to process the remote party's chan reest message, we'll already call this method. Otherwise, we'll get an error here since the pending verification nonce has been wiped out after each call.
This commit is contained in:
parent
5379823346
commit
28c086f1fc
@ -10,7 +10,6 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/btcsuite/btcd/btcec/v2/schnorr/musig2"
|
||||
"github.com/btcsuite/btcd/btcutil"
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/btcsuite/btclog"
|
||||
@ -739,26 +738,6 @@ func (l *channelLink) syncChanStates() error {
|
||||
}
|
||||
}
|
||||
|
||||
// Before we process the ChanSync message, if this is a taproot
|
||||
// channel, then we'll init our musig2 nonces state.
|
||||
if chanState.ChanType.IsTaproot() {
|
||||
l.log.Infof("initializing musig2 nonces")
|
||||
|
||||
if remoteChanSyncMsg.LocalNonce == nil {
|
||||
return fmt.Errorf("remote nonce is nil")
|
||||
}
|
||||
|
||||
syncMsg := remoteChanSyncMsg
|
||||
remoteNonce := &musig2.Nonces{
|
||||
PubNonce: *syncMsg.LocalNonce,
|
||||
}
|
||||
err := l.channel.InitRemoteMusigNonces(remoteNonce)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to init musig2 "+
|
||||
"nonces: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
// In any case, we'll then process their ChanSync message.
|
||||
l.log.Info("received re-establishment message from remote side")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user