eth, eth/downloader: don't require td on downloader. Fixed tests

This commit is contained in:
obscuren
2015-04-24 15:04:58 +02:00
parent b86e7526e1
commit 31f82eb334
4 changed files with 22 additions and 25 deletions

View File

@ -134,14 +134,14 @@ out:
if len(pm.peers) < minDesiredPeerCount {
break
}
itimer.Stop()
// Find the best peer
peer := getBestPeer(pm.peers)
if peer == nil {
glog.V(logger.Debug).Infoln("Sync attempt cancelled. No peers available")
return
}
itimer.Stop()
go pm.synchronise(peer)
case <-itimer.C:
// The timer will make sure that the downloader keeps an active state