aboutsummaryrefslogtreecommitdiffstats
path: root/swarm
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-02-22 20:56:09 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-02-23 18:16:45 +0800
commit61e6bb12478740d614c8effd330f881f962b7b84 (patch)
tree71109a9d02fd7d0b243994b5584618b9e8b46d7b /swarm
parentd4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851 (diff)
downloaddexon-61e6bb12478740d614c8effd330f881f962b7b84.tar
dexon-61e6bb12478740d614c8effd330f881f962b7b84.tar.gz
dexon-61e6bb12478740d614c8effd330f881f962b7b84.tar.bz2
dexon-61e6bb12478740d614c8effd330f881f962b7b84.tar.lz
dexon-61e6bb12478740d614c8effd330f881f962b7b84.tar.xz
dexon-61e6bb12478740d614c8effd330f881f962b7b84.tar.zst
dexon-61e6bb12478740d614c8effd330f881f962b7b84.zip
eth, les, swarm: fix go vet issues sufraced by log15
Diffstat (limited to 'swarm')
-rw-r--r--swarm/api/api.go2
-rw-r--r--swarm/network/depo.go2
-rw-r--r--swarm/network/kademlia/kaddb.go4
-rw-r--r--swarm/network/syncdb.go2
-rw-r--r--swarm/network/syncer.go4
-rw-r--r--swarm/swarm.go2
6 files changed, 8 insertions, 8 deletions
diff --git a/swarm/api/api.go b/swarm/api/api.go
index 3376fb484..7af27208d 100644
--- a/swarm/api/api.go
+++ b/swarm/api/api.go
@@ -84,7 +84,7 @@ func (self *Api) Resolve(hostPort string, nameresolver bool) (storage.Key, error
err = ErrResolve(err)
log.Warn(fmt.Sprintf("DNS error : %v", err))
}
- log.Trace(fmt.Sprintf("host lookup: %v -> %v", err))
+ log.Trace(fmt.Sprintf("host lookup: %v -> %v", hostPort, contentHash))
return contentHash[:], err
}
func Parse(uri string) (hostPort, path string) {
diff --git a/swarm/network/depo.go b/swarm/network/depo.go
index 340128aa8..e76bfa66c 100644
--- a/swarm/network/depo.go
+++ b/swarm/network/depo.go
@@ -211,7 +211,7 @@ only add if less than requesterCount peers forwarded the same request id so far
note this is done irrespective of status (searching or found)
*/
func (self *Depo) addRequester(rs *storage.RequestStatus, req *retrieveRequestMsgData) {
- log.Trace(fmt.Sprintf("Depo.addRequester: key %v - add peer to req.Id %v", req.Key.Log(), req.from, req.Id))
+ log.Trace(fmt.Sprintf("Depo.addRequester: key %v - add peer to req.Id %v", req.Key.Log(), req.Id))
list := rs.Requesters[req.Id]
rs.Requesters[req.Id] = append(list, req)
}
diff --git a/swarm/network/kademlia/kaddb.go b/swarm/network/kademlia/kaddb.go
index f4279917e..3e4b261fd 100644
--- a/swarm/network/kademlia/kaddb.go
+++ b/swarm/network/kademlia/kaddb.go
@@ -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))
}
diff --git a/swarm/network/syncdb.go b/swarm/network/syncdb.go
index 7216da525..88b4b68dd 100644
--- a/swarm/network/syncdb.go
+++ b/swarm/network/syncdb.go
@@ -217,7 +217,7 @@ LOOP:
// if just switched to db mode and not quitting, then launch dbRead
// in a parallel go routine to send deliveries from db
if inDb == 0 && quit != nil {
- log.Trace(fmt.Sprintf("syncDb[%v/%v] start dbRead"))
+ log.Trace(fmt.Sprintf("syncDb[%v/%v] start dbRead", self.key.Log(), self.priority))
go self.dbRead(true, counter, deliver)
}
inDb++
diff --git a/swarm/network/syncer.go b/swarm/network/syncer.go
index eb932e927..20129c2a8 100644
--- a/swarm/network/syncer.go
+++ b/swarm/network/syncer.go
@@ -480,7 +480,7 @@ LOOP:
stateCopy := *state
err := self.unsyncedKeys(unsynced, &stateCopy)
if err != nil {
- log.Warn(fmt.Sprintf("syncer[%v]: unable to send unsynced keys: %v", err))
+ log.Warn(fmt.Sprintf("syncer[%v]: unable to send unsynced keys: %v", self.key.Log(), err))
}
self.state = state
log.Debug(fmt.Sprintf("syncer[%v]: --> %v keys sent: (total: %v (%v), history: %v), sent sync state: %v", self.key.Log(), len(unsynced), keyCounts, keyCount, historyCnt, stateCopy))
@@ -553,7 +553,7 @@ LOOP:
log.Trace(fmt.Sprintf("syncer[%v]: (priority %v): request %v (synced = %v)", self.key.Log(), priority, req, state.Synced))
unsynced = append(unsynced, sreq)
} else {
- log.Warn(fmt.Sprintf("syncer[%v]: (priority %v): error creating request for %v: %v)", self.key.Log(), priority, req, state.Synced, err))
+ log.Warn(fmt.Sprintf("syncer[%v]: (priority %v): error creating request for %v: %v)", self.key.Log(), priority, req, err))
}
}
diff --git a/swarm/swarm.go b/swarm/swarm.go
index b2894c6e7..44564a71d 100644
--- a/swarm/swarm.go
+++ b/swarm/swarm.go
@@ -197,7 +197,7 @@ func (self *Swarm) Start(net *p2p.Server) error {
log.Debug(fmt.Sprintf("Swarm http proxy started on port: %v", self.config.Port))
if self.corsString != "" {
- log.Debug(fmt.Sprintf("Swarm http proxy started with corsdomain:", self.corsString))
+ log.Debug(fmt.Sprintf("Swarm http proxy started with corsdomain: %v", self.corsString))
}
return nil