From 7ef1f3f636d42e859b1f431efb13c3e50ae8b9b9 Mon Sep 17 00:00:00 2001 From: Wilmer Paulino Date: Wed, 6 Jan 2021 12:51:22 -0800 Subject: [PATCH] discovery: use source of ann upon confirmed channel ann batch We do this instead of using the source of the AnnounceSignatures message, as we filter out the source when broadcasting any announcements, leading to the remote node not receiving our channel update. Note that this is done more for the sake of correctness and to address a flake within the integration tests, as channel updates are sent directly and reliably to channel counterparts. --- discovery/gossiper.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/discovery/gossiper.go b/discovery/gossiper.go index d8a8efe5..32eba9ce 100644 --- a/discovery/gossiper.go +++ b/discovery/gossiper.go @@ -2245,17 +2245,17 @@ func (d *AuthenticatedGossiper) processNetworkAnnouncement( source: nMsg.source, msg: chanAnn, }) - if e1Ann != nil { + if src, err := chanInfo.NodeKey1(); err == nil && e1Ann != nil { announcements = append(announcements, networkMsg{ peer: nMsg.peer, - source: nMsg.source, + source: src, msg: e1Ann, }) } - if e2Ann != nil { + if src, err := chanInfo.NodeKey2(); err == nil && e2Ann != nil { announcements = append(announcements, networkMsg{ peer: nMsg.peer, - source: nMsg.source, + source: src, msg: e2Ann, }) }