Wait with mining until up to date

This commit is contained in:
Maran 2014-05-21 11:45:19 +02:00
parent d16d56d39f
commit 0bccf1c3cd

View File

@ -34,11 +34,10 @@ func DoMining(ethereum *eth.Ethereum) {
// Give it some time to connect with peers
time.Sleep(3 * time.Second)
/*
for ethereum.IsUpToDate() == false {
time.Sleep(5 * time.Second)
}
*/
for ethereum.IsUpToDate() == false {
time.Sleep(5 * time.Second)
}
ethutil.Config.Log.Infoln("Miner started")
miner := ethminer.NewDefaultMiner(addr, ethereum)