eth,core: changed NewTicker to Tick

This commit is contained in:
obscuren
2015-05-01 16:30:02 +02:00
parent b298928c49
commit c6ad3aec05
2 changed files with 6 additions and 6 deletions

View File

@ -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
}
}
}