breacharbiter: only log if we have any active channels

This commit modifies the contractObserver slightly to along log if we
have any active channels, which avoids a meaningless log message.
This commit is contained in:
Olaoluwa Osuntokun 2017-01-05 13:21:39 -08:00
parent 5957725975
commit beb6303e2f
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2

@ -128,8 +128,10 @@ func (b *breachArbiter) contractObserver() {
brarLog.Errorf("unable to fetch active channels: %v", err)
}
brarLog.Infof("Retrieved %v channels from database, watching with "+
"vigilance!", len(activeChannels))
if len(activeChannels) > 0 {
brarLog.Infof("Retrieved %v channels from database, watching "+
"with vigilance!", len(activeChannels))
}
// For each active channel found within the database, we launch a
// detected breachObserver goroutine for that channel and also track