From 3276bf29607c8758014b5c2c9ca1f7aa51fdd4e1 Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Thu, 19 Sep 2019 12:47:08 -0700 Subject: [PATCH] htlcswitch/link: remove channel reestablish deadline Now that the link will remain ineligible until it receives channel_reestablish from the remote peer, we can remove the channel reestablish timeout entirely. --- htlcswitch/link.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/htlcswitch/link.go b/htlcswitch/link.go index f405fa7c1..64e6dd000 100644 --- a/htlcswitch/link.go +++ b/htlcswitch/link.go @@ -640,10 +640,8 @@ func (l *channelLink) syncChanStates() error { var msgsToReSend []lnwire.Message - // Next, we'll wait to receive the ChanSync message with a timeout - // period. The first message sent MUST be the ChanSync message, - // otherwise, we'll terminate the connection. - chanSyncDeadline := time.After(time.Second * 30) + // Next, we'll wait indefinitely to receive the ChanSync message. The + // first message sent MUST be the ChanSync message. select { case msg := <-l.upstream: remoteChanSyncMsg, ok := msg.(*lnwire.ChannelReestablish) @@ -727,10 +725,6 @@ func (l *channelLink) syncChanStates() error { case <-l.quit: return ErrLinkShuttingDown - - case <-chanSyncDeadline: - return fmt.Errorf("didn't receive ChannelReestablish before " + - "deadline") } return nil