diff --git a/peer/brontide.go b/peer/brontide.go index 70dc477bd1..c1a578d023 100644 --- a/peer/brontide.go +++ b/peer/brontide.go @@ -661,19 +661,6 @@ func (p *Brontide) Start() error { } } - // Node announcements don't propagate very well throughout the network - // as there isn't a way to efficiently query for them through their - // timestamp, mostly affecting nodes that were offline during the time - // of broadcast. We'll resend our node announcement to the remote peer - // as a best-effort delivery such that it can also propagate to their - // peers. To ensure they can successfully process it in most cases, - // we'll only resend it as long as we have at least one confirmed - // advertised channel with the remote peer. - // - // TODO(wilmer): Remove this once we're able to query for node - // announcements through their timestamps. - p.maybeSendNodeAnn(activeChans) - return nil } @@ -1047,36 +1034,6 @@ func (p *Brontide) addLink(chanPoint *wire.OutPoint, return p.cfg.Switch.CreateAndAddLink(linkCfg, lnChan) } -// maybeSendNodeAnn sends our node announcement to the remote peer if at least -// one confirmed public channel exists with them. -func (p *Brontide) maybeSendNodeAnn(channels []*channeldb.OpenChannel) { - hasConfirmedPublicChan := false - for _, channel := range channels { - if channel.IsPending { - continue - } - if channel.ChannelFlags&lnwire.FFAnnounceChannel == 0 { - continue - } - - hasConfirmedPublicChan = true - break - } - if !hasConfirmedPublicChan { - return - } - - ourNodeAnn, err := p.cfg.GenNodeAnnouncement() - if err != nil { - p.log.Debugf("Unable to retrieve node announcement: %v", err) - return - } - - if err := p.SendMessageLazy(false, &ourNodeAnn); err != nil { - p.log.Debugf("Unable to resend node announcement: %v", err) - } -} - // WaitForDisconnect waits until the peer has disconnected. A peer may be // disconnected if the local or remote side terminates the connection, or an // irrecoverable protocol error has been encountered. This method will only