From f7c423768668f4f0ae91057583c8ba5639921b03 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Sun, 30 Jul 2017 14:07:46 -0700 Subject: [PATCH] htlcswitch: remove initial revocation window extension in channelLink We can safely remove the initial revocation window extension as this has gone away with the new state machine. We instead now just fill the window once the channel has been opened, and then maintain a fixed window size of 2 from there on. --- htlcswitch/link.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/htlcswitch/link.go b/htlcswitch/link.go index 61d1ce76e..d38016238 100644 --- a/htlcswitch/link.go +++ b/htlcswitch/link.go @@ -265,17 +265,6 @@ func (l *channelLink) htlcManager() { log.Infof("HTLC manager for ChannelPoint(%v) started, "+ "bandwidth=%v", l.channel.ChannelPoint(), l.getBandwidth()) - // A new session for this active channel has just started, therefore we - // need to send our initial revocation window to the remote peer. - for i := 0; i < lnwallet.InitialRevocationWindow; i++ { - rev, err := l.channel.ExtendRevocationWindow() - if err != nil { - log.Errorf("unable to expand revocation window: %v", err) - continue - } - l.cfg.Peer.SendMessage(rev) - } - // TODO(roasbeef): check to see if able to settle any currently pending // HTLCs // * also need signals when new invoices are added by the