From 904003fbcb67df2e939c312759c282cf8f5f92df 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 4f792fd42..e669f61aa 100644 --- a/discovery/gossiper.go +++ b/discovery/gossiper.go @@ -2336,17 +2336,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, }) }