aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-05-01 22:30:02 +0800
committerobscuren <geffobscura@gmail.com>2015-05-03 19:27:37 +0800
commitc6ad3aec05e1c42c3e4a222d1e8306598d5254f3 (patch)
tree2e0ffcb81a8c4d6bd6fa004e81d4cdf942bb3596 /eth
parentb298928c49d1af3dc1165b295fe43fc8d0d6061d (diff)
downloaddexon-c6ad3aec05e1c42c3e4a222d1e8306598d5254f3.tar
dexon-c6ad3aec05e1c42c3e4a222d1e8306598d5254f3.tar.gz
dexon-c6ad3aec05e1c42c3e4a222d1e8306598d5254f3.tar.bz2
dexon-c6ad3aec05e1c42c3e4a222d1e8306598d5254f3.tar.lz
dexon-c6ad3aec05e1c42c3e4a222d1e8306598d5254f3.tar.xz
dexon-c6ad3aec05e1c42c3e4a222d1e8306598d5254f3.tar.zst
dexon-c6ad3aec05e1c42c3e4a222d1e8306598d5254f3.zip
eth,core: changed NewTicker to Tick
Diffstat (limited to 'eth')
-rw-r--r--eth/sync.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/eth/sync.go b/eth/sync.go
index bcf4b231f..16d85d1f1 100644
--- a/eth/sync.go
+++ b/eth/sync.go
@@ -15,8 +15,8 @@ func (pm *ProtocolManager) update() {
// itimer is used to determine when to start ignoring `minDesiredPeerCount`
itimer := time.NewTimer(peerCountTimeout)
// btimer is used for picking of blocks from the downloader
- btimer := time.NewTicker(blockProcTimer)
-out:
+ btimer := time.Tick(blockProcTimer)
+
for {
select {
case <-pm.newPeerCh:
@@ -43,10 +43,10 @@ out:
} else {
itimer.Reset(5 * time.Second)
}
- case <-btimer.C:
+ case <-btimer:
go pm.processBlocks()
case <-pm.quitSync:
- break out
+ return
}
}
}