aboutsummaryrefslogtreecommitdiffstats
path: root/utils/cmd.go
diff options
context:
space:
mode:
Diffstat (limited to 'utils/cmd.go')
-rw-r--r--utils/cmd.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/utils/cmd.go b/utils/cmd.go
index 98005d7de..e1fc0fc00 100644
--- a/utils/cmd.go
+++ b/utils/cmd.go
@@ -33,13 +33,18 @@ func DoMining(ethereum *eth.Ethereum) {
addr := keyPair.Address()
go func() {
- ethutil.Config.Log.Infoln("Miner started")
-
miner = ethminer.NewDefaultMiner(addr, ethereum)
// Give it some time to connect with peers
time.Sleep(3 * time.Second)
+ for ethereum.IsUpToDate() == false {
+ time.Sleep(5 * time.Second)
+ }
+
+ ethutil.Config.Log.Infoln("Miner started")
+
+ miner := ethminer.NewDefaultMiner(addr, ethereum)
miner.Start()
}()
}