Commit c6ad3aec authored by obscuren's avatar obscuren

eth,core: changed NewTicker to Tick

parent b298928c
......@@ -669,7 +669,7 @@ func (self *ChainManager) merge(oldBlock, newBlock *types.Block) {
func (self *ChainManager) update() {
events := self.eventMux.Subscribe(queueEvent{})
futureTimer := time.NewTicker(5 * time.Second)
futureTimer := time.Tick(5 * time.Second)
out:
for {
select {
......@@ -696,7 +696,7 @@ out:
self.eventMux.Post(event)
}
}
case <-futureTimer.C:
case <-futureTimer:
self.procFutureBlocks()
case <-self.quit:
break out
......
......@@ -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
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment