aboutsummaryrefslogtreecommitdiffstats
path: root/eth/handler.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-04-29 03:18:08 +0800
committerobscuren <geffobscura@gmail.com>2015-04-29 18:51:05 +0800
commit4b7bdc3766e1e06ebd6f865f0fdda26f9b331932 (patch)
treedd563a35619f732bb2ad9f5dfeb1a885e9fa4398 /eth/handler.go
parent7ac24d551bf41bca4deec9f47239c4c0d052e721 (diff)
downloadgo-tangerine-4b7bdc3766e1e06ebd6f865f0fdda26f9b331932.tar
go-tangerine-4b7bdc3766e1e06ebd6f865f0fdda26f9b331932.tar.gz
go-tangerine-4b7bdc3766e1e06ebd6f865f0fdda26f9b331932.tar.bz2
go-tangerine-4b7bdc3766e1e06ebd6f865f0fdda26f9b331932.tar.lz
go-tangerine-4b7bdc3766e1e06ebd6f865f0fdda26f9b331932.tar.xz
go-tangerine-4b7bdc3766e1e06ebd6f865f0fdda26f9b331932.tar.zst
go-tangerine-4b7bdc3766e1e06ebd6f865f0fdda26f9b331932.zip
eth: check if downloader is busy before showing log message
Diffstat (limited to 'eth/handler.go')
-rw-r--r--eth/handler.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/eth/handler.go b/eth/handler.go
index d00d00f23..61149049e 100644
--- a/eth/handler.go
+++ b/eth/handler.go
@@ -163,6 +163,11 @@ func (pm *ProtocolManager) synchronise(peer *peer) {
if peer.td.Cmp(pm.chainman.Td()) <= 0 {
return
}
+ // Check downloader if it's busy so it doesn't show the sync message
+ // for every attempty
+ if pm.downloader.IsBusy() {
+ return
+ }
glog.V(logger.Info).Infof("Synchronisation attempt using %s TD=%v\n", peer.id, peer.td)
// Get the hashes from the peer (synchronously)