diff options
author | obscuren <geffobscura@gmail.com> | 2014-06-29 16:43:56 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-06-29 16:43:56 +0800 |
commit | 4fc60f340f6ef5ffe68e684ed44e5974fa08e8c8 (patch) | |
tree | 94a3b7ba10a3cd7789a05f97db7776185486125a /utils | |
parent | 2d274003b8618a0121d65f58e406afac45b8e569 (diff) | |
download | go-tangerine-4fc60f340f6ef5ffe68e684ed44e5974fa08e8c8.tar go-tangerine-4fc60f340f6ef5ffe68e684ed44e5974fa08e8c8.tar.gz go-tangerine-4fc60f340f6ef5ffe68e684ed44e5974fa08e8c8.tar.bz2 go-tangerine-4fc60f340f6ef5ffe68e684ed44e5974fa08e8c8.tar.lz go-tangerine-4fc60f340f6ef5ffe68e684ed44e5974fa08e8c8.tar.xz go-tangerine-4fc60f340f6ef5ffe68e684ed44e5974fa08e8c8.tar.zst go-tangerine-4fc60f340f6ef5ffe68e684ed44e5974fa08e8c8.zip |
Wait for catchup when starting the miner
Diffstat (limited to 'utils')
-rw-r--r-- | utils/cmd.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/cmd.go b/utils/cmd.go index c084542b4..1d97c9639 100644 --- a/utils/cmd.go +++ b/utils/cmd.go @@ -204,6 +204,10 @@ func StartMining(ethereum *eth.Ethereum) bool { 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) + } + logger.Infoln("Miner started") miner := ethminer.NewDefaultMiner(addr, ethereum) miner.Start() |