routing: only log pre-mature announcements if we have any

This commit is contained in:
Olaoluwa Osuntokun 2017-02-07 18:38:39 -08:00
parent 7f98e8e5f1
commit a094681dae
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2

@ -384,8 +384,10 @@ func (r *ChannelRouter) networkHandler() {
// for this height, if so, then we process them once
// more as normal announcements.
prematureAnns := r.prematureAnnouncements[uint32(newBlock.Height)]
log.Infof("Re-processing %v premature announcements for "+
"height %v", len(prematureAnns), blockHeight)
if len(prematureAnns) != 0 {
log.Infof("Re-processing %v premature announcements for "+
"height %v", len(prematureAnns), blockHeight)
}
for _, ann := range prematureAnns {
if ok := r.processNetworkAnnouncement(ann); ok {