@cryptotaxi247 / kubo / commits / 6c2d799cb

periodically print the number of keys in the wantlist (if any)

Brian Tiger Chow committed Jan 20, 2015 at 02:43 UTC 6c2d799cb91895c28f45ea7a35b8016de57a6309
1 file changed +5
exchange/bitswap/bitswap.go
+5
@@ -262,6 +262,11 @@ func (bs *bitswap) clientWorker(parent context.Context) {
262
263 for {
264 select {
265 + case <-time.Tick(10 * time.Second):
266 + n := bs.wantlist.Len()
267 + if n > 0 {
268 + log.Debugf("%d keys in bitswap wantlist...", n)
269 + }
270 case <-broadcastSignal: // resend unfulfilled wantlist keys
271 entries := bs.wantlist.Entries()
272 if len(entries) > 0 {