lnd/peer
Eugene Siegel dc42b160a0
multi: skip InitRemoteMusigNonces if we've already called it
Prior to this commit, taproot channels had a bug:

- If a disconnect happened before peer.AddNewChannel was called,
  then the subsequent reconnect would call peer.AddNewChannel and
  attempt the ChannelReestablish dance.

- peer.AddNewChannel would call NewLightningChannel with
  populated nonce ChannelOpts. This in turn would call
  InitRemoteMusigNonces which would create a new musig pair session
  and set the channel's pendingVerificationNonce to nil.

- During the reestablish dance, ProcessChanSyncMsg would be called.
  This would also call InitRemoteMusigNonces, except it would fail
  since pendingVerificationNonce was set to nil in the previous
  invocation.

To fix this, we add a new functional option to signal to the init logic
that it doesn't need to call InitRemoteMusigNonces in   in
ProcessChanSyncMsg.
2023-10-31 10:10:35 -07:00
..
brontide_test.go peer: fix unit test flake 2023-10-13 13:50:07 +08:00
brontide.go multi: skip InitRemoteMusigNonces if we've already called it 2023-10-31 10:10:35 -07:00
interfaces.go htlcswitch+peer: CreateAndAddLink in switch, add messageSwitch to peer 2021-08-10 17:15:52 -04:00
log.go multi: remove peer.go, change all references to point to peer pkg 2020-07-06 19:16:07 -04:00
musig_chan_closer.go lnwallet: fix taproot co-op close nonce bug 2023-08-22 16:33:50 -07:00
ping_manager_test.go peer: Add machinery to track the state and validity of remote pongs 2023-10-19 09:26:45 -07:00
ping_manager.go peer: Add machinery to track the state and validity of remote pongs 2023-10-19 09:26:45 -07:00
test_utils.go input+wallet: extract musig2 session management into new module 2023-08-22 16:30:39 -07:00