diff options
author | obscuren <geffobscura@gmail.com> | 2014-07-18 18:21:34 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-07-18 18:21:34 +0800 |
commit | 75df148ba2644b6f862c7a78599a7b83177fb456 (patch) | |
tree | 1f67d6bba7ea76539f62f51d1190f7d2240f464a /utils | |
parent | 2b9f16802d22b8d743797aecc9bd040a38d6f1f4 (diff) | |
parent | 4572d4940c5b027918364e0600fc88a50f73ed16 (diff) | |
download | dexon-75df148ba2644b6f862c7a78599a7b83177fb456.tar.gz dexon-75df148ba2644b6f862c7a78599a7b83177fb456.tar.zst dexon-75df148ba2644b6f862c7a78599a7b83177fb456.zip |
Fixed miner channel
Diffstat (limited to 'utils')
-rw-r--r-- | utils/cmd.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/cmd.go b/utils/cmd.go index 638114bbe..f4d613c29 100644 --- a/utils/cmd.go +++ b/utils/cmd.go @@ -234,10 +234,10 @@ func StartRpc(ethereum *eth.Ethereum, RpcPort int) { } } -var miner ethminer.Miner +var miner *ethminer.Miner func GetMiner() *ethminer.Miner { - return &miner + return miner } func StartMining(ethereum *eth.Ethereum) bool { @@ -267,7 +267,7 @@ func StartMining(ethereum *eth.Ethereum) bool { } func StopMining(ethereum *eth.Ethereum) bool { - if ethereum.Mining { + if ethereum.Mining && miner != nil { miner.Stop() logger.Infoln("Miner stopped") ethereum.Mining = false |