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.
This commit is contained in:
Conner Fromknecht 2019-09-19 12:47:08 -07:00
parent 9d6ee2ebd9
commit 3276bf2960
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7

@ -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