From beb6303e2f281f2c74b65661b845d8a186ae6f60 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Thu, 5 Jan 2017 13:21:39 -0800 Subject: [PATCH] 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. --- breacharbiter.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/breacharbiter.go b/breacharbiter.go index 3d4d7c21b..75c3b7438 100644 --- a/breacharbiter.go +++ b/breacharbiter.go @@ -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