eth, les, swarm: fix go vet issues sufraced by log15

This commit is contained in:
Péter Szilágyi
2017-02-22 14:56:09 +02:00
parent d4fd06c3dc
commit 61e6bb1247
8 changed files with 10 additions and 10 deletions

View File

@@ -120,7 +120,7 @@ func (self *KadDb) add(nrs []*NodeRecord, proximityBin func(Address) int) {
copy(newnodes[:], nodes[:dbcursor])
newnodes[dbcursor] = node
copy(newnodes[dbcursor+1:], nodes[dbcursor:])
log.Trace(fmt.Sprintf("new nodes: %v (keys: %v)\nnodes: %v", newnodes, nodes))
log.Trace(fmt.Sprintf("new nodes: %v, nodes: %v", newnodes, nodes))
self.Nodes[index] = newnodes
n++
}
@@ -294,7 +294,7 @@ func (self *KadDb) save(path string, cb func(*NodeRecord, Node)) error {
}
err = ioutil.WriteFile(path, data, os.ModePerm)
if err != nil {
log.Warn(fmt.Sprintf("unable to save kaddb with %v nodes to %v: err", n, path, err))
log.Warn(fmt.Sprintf("unable to save kaddb with %v nodes to %v: %v", n, path, err))
} else {
log.Info(fmt.Sprintf("saved kaddb with %v nodes to %v", n, path))
}