discovery: log failed attempts in replyShortChanIDs

This commit is contained in:
Olaoluwa Osuntokun 2018-06-13 16:44:49 -07:00
parent 0d607f675f
commit f2273d9503
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

View File

@ -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