networkdb: do nothing in bulkSync if nodes is empty

This patch allows getting rid of annoying debug message.

Signed-off-by: Alexander Morozov <lk4d4math@gmail.com>
This commit is contained in:
Alexander Morozov 2016-07-11 09:09:49 -07:00
parent 10aec4d8f0
commit af3158ecdb

View file

@ -360,6 +360,10 @@ func (nDB *NetworkDB) bulkSync(nid string, nodes []string, all bool) ([]string,
nodes = nDB.mRandomNodes(1, nodes)
}
if len(nodes) == 0 {
return nil, nil
}
logrus.Debugf("%s: Initiating bulk sync with nodes %v", nDB.config.NodeName, nodes)
var err error
var networks []string