From f2273d95031640242cb1f0d91f75c316398fcd68 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Wed, 13 Jun 2018 16:44:49 -0700 Subject: [PATCH] discovery: log failed attempts in replyShortChanIDs --- discovery/syncer.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/discovery/syncer.go b/discovery/syncer.go index d115c7234..a65c90b8c 100644 --- a/discovery/syncer.go +++ b/discovery/syncer.go @@ -715,6 +715,12 @@ func (g *gossipSyncer) replyShortChanIDs(query *lnwire.QueryShortChanIDs) error }) } + if len(query.ShortChanIDs) == 0 { + log.Infof("gossipSyncer(%x): ignoring query for blank short chan ID's", + g.peerPub[:]) + return nil + } + log.Infof("gossipSyncer(%x): fetching chan anns for %v chans", g.peerPub[:], len(query.ShortChanIDs)) @@ -726,7 +732,8 @@ func (g *gossipSyncer) replyShortChanIDs(query *lnwire.QueryShortChanIDs) error query.ChainHash, query.ShortChanIDs, ) if err != nil { - return err + return fmt.Errorf("unable to fetch chan anns for %v..., %v", + query.ShortChanIDs[0].ToUint64(), err) } // If we didn't find any messages related to those channel ID's, then