aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-06-04 20:10:43 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-06-04 20:10:43 +0800
commit24cca2f18d4a7abb103179a289db09c2d11bd2a3 (patch)
tree47646bdb747e66d39a27e0f7c630c3da407e232c /eth
parent28c32d1b1bc9ed687713aa4de4eaab38d2a4cb08 (diff)
downloadgo-tangerine-24cca2f18d4a7abb103179a289db09c2d11bd2a3.tar
go-tangerine-24cca2f18d4a7abb103179a289db09c2d11bd2a3.tar.gz
go-tangerine-24cca2f18d4a7abb103179a289db09c2d11bd2a3.tar.bz2
go-tangerine-24cca2f18d4a7abb103179a289db09c2d11bd2a3.tar.lz
go-tangerine-24cca2f18d4a7abb103179a289db09c2d11bd2a3.tar.xz
go-tangerine-24cca2f18d4a7abb103179a289db09c2d11bd2a3.tar.zst
go-tangerine-24cca2f18d4a7abb103179a289db09c2d11bd2a3.zip
eth/downloader: log after state updates, easier to debug
Diffstat (limited to 'eth')
-rw-r--r--eth/downloader/downloader.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go
index 806f60f1b..d8dbef726 100644
--- a/eth/downloader/downloader.go
+++ b/eth/downloader/downloader.go
@@ -428,24 +428,22 @@ out:
return err
}
// Peer did deliver, but some blocks were off, penalize
- glog.V(logger.Detail).Infof("%s: block delivery failed: %v", peer, err)
peer.Demote()
peer.SetIdle()
+ glog.V(logger.Detail).Infof("%s: block delivery failed: %v", peer, err)
break
}
// If no blocks were delivered, demote the peer (above code is needed to mark the packet done!)
if len(blockPack.blocks) == 0 {
- glog.V(logger.Detail).Infof("%s: no blocks delivered", peer)
peer.Demote()
peer.SetIdle()
+ glog.V(logger.Detail).Infof("%s: no blocks delivered", peer)
break
}
// All was successful, promote the peer
- if glog.V(logger.Detail) && len(blockPack.blocks) > 0 {
- glog.Infof("%s: delivered %d blocks", peer, len(blockPack.blocks))
- }
peer.Promote()
peer.SetIdle()
+ glog.V(logger.Detail).Infof("%s: delivered %d blocks", peer, len(blockPack.blocks))
}
case <-ticker.C:
// Check for bad peers. Bad peers may indicate a peer not responding