mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-21 20:26:41 +00:00
remove waiting for peers when start mining
This commit is contained in:
parent
f58f322179
commit
ffaa693b7f
1 changed files with 0 additions and 6 deletions
|
|
@ -10,7 +10,6 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"regexp"
|
"regexp"
|
||||||
"runtime"
|
"runtime"
|
||||||
"time"
|
|
||||||
|
|
||||||
"bitbucket.org/kardianos/osext"
|
"bitbucket.org/kardianos/osext"
|
||||||
"github.com/ethereum/eth-go"
|
"github.com/ethereum/eth-go"
|
||||||
|
|
@ -267,11 +266,6 @@ func StartMining(ethereum *eth.Ethereum) bool {
|
||||||
if miner == nil {
|
if miner == nil {
|
||||||
miner = ethminer.NewDefaultMiner(addr, ethereum)
|
miner = ethminer.NewDefaultMiner(addr, ethereum)
|
||||||
}
|
}
|
||||||
// Give it some time to connect with peers
|
|
||||||
time.Sleep(3 * time.Second)
|
|
||||||
for !ethereum.IsUpToDate() {
|
|
||||||
time.Sleep(5 * time.Second)
|
|
||||||
}
|
|
||||||
miner.Start()
|
miner.Start()
|
||||||
}()
|
}()
|
||||||
RegisterInterrupt(func(os.Signal) {
|
RegisterInterrupt(func(os.Signal) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue