eth: fix megacheck warnings
This commit is contained in:
@ -138,7 +138,9 @@ func (pm *ProtocolManager) syncer() {
|
||||
defer pm.downloader.Terminate()
|
||||
|
||||
// Wait for different events to fire synchronisation operations
|
||||
forceSync := time.Tick(forceSyncCycle)
|
||||
forceSync := time.NewTicker(forceSyncCycle)
|
||||
defer forceSync.Stop()
|
||||
|
||||
for {
|
||||
select {
|
||||
case <-pm.newPeerCh:
|
||||
@ -148,7 +150,7 @@ func (pm *ProtocolManager) syncer() {
|
||||
}
|
||||
go pm.synchronise(pm.peers.BestPeer())
|
||||
|
||||
case <-forceSync:
|
||||
case <-forceSync.C:
|
||||
// Force a sync even if not enough peers are present
|
||||
go pm.synchronise(pm.peers.BestPeer())
|
||||
|
||||
|
Reference in New Issue
Block a user