peer: skip retrying when reenableTimeout is greater than 1 min
This commit makes retrying enabling channels conditional. We now would only retry sending the enable request when the `ChanActiveTimeout` is no greater than 1 min.
This commit is contained in:
2 files changed
+65
-21
No files matched your search
+1
-4
@@ -410,11 +410,8 @@ func createTestPeer(t *testing.T, notifier chainntnfs.ChainNotifier,
|
||||
chanID := lnwire.NewChanIDFromOutPoint(channelAlice.ChannelPoint())
|
||||
alicePeer.activeChannels[chanID] = channelAlice
|
||||
|
||||
sub, err := cfg.ChannelNotifier.SubscribeChannelEvents()
|
||||
require.NoError(t, err)
|
||||
|
||||
alicePeer.wg.Add(1)
|
||||
go alicePeer.channelManager(sub)
|
||||
go alicePeer.channelManager()
|
||||
|
||||
return alicePeer, channelBob, nil
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user