diff options
author | obscuren <geffobscura@gmail.com> | 2014-10-31 21:56:42 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-10-31 21:56:42 +0800 |
commit | 5af4ff985dc43b648bdc96394a3bd96d9658ae0a (patch) | |
tree | 998a0a28f5599b5956a4ac9d55e8569ac12116df /cmd | |
parent | 4914a78c8c650d7fc74570f25a682598aaeb6973 (diff) | |
download | dexon-5af4ff985dc43b648bdc96394a3bd96d9658ae0a.tar.gz dexon-5af4ff985dc43b648bdc96394a3bd96d9658ae0a.tar.zst dexon-5af4ff985dc43b648bdc96394a3bd96d9658ae0a.zip |
ethminer => miner
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/mist/gui.go | 10 | ||||
-rw-r--r-- | cmd/utils/cmd.go | 18 |
2 files changed, 14 insertions, 14 deletions
diff --git a/cmd/mist/gui.go b/cmd/mist/gui.go index d309e0a9b..d6f6832e2 100644 --- a/cmd/mist/gui.go +++ b/cmd/mist/gui.go @@ -33,9 +33,9 @@ import ( "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/chain" "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/ethminer" "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/logger" + "github.com/ethereum/go-ethereum/miner" "github.com/ethereum/go-ethereum/wire" "github.com/ethereum/go-ethereum/xeth" "gopkg.in/qml.v1" @@ -92,7 +92,7 @@ type Gui struct { plugins map[string]plugin - miner *ethminer.Miner + miner *miner.Miner stdLog logger.LogSystem } @@ -410,7 +410,7 @@ func (gui *Gui) update() { chain.NewBlockEvent{}, chain.TxPreEvent{}, chain.TxPostEvent{}, - ethminer.Event{}, + miner.Event{}, ) // nameReg := gui.pipe.World().Config().Get("NameReg") @@ -469,8 +469,8 @@ func (gui *Gui) update() { case eth.PeerListEvent: gui.setPeerInfo() - case ethminer.Event: - if ev.Type == ethminer.Started { + case miner.Event: + if ev.Type == miner.Started { gui.miner = ev.Miner } else { gui.miner = nil diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go index 5313b8fad..ef2ce8b47 100644 --- a/cmd/utils/cmd.go +++ b/cmd/utils/cmd.go @@ -16,9 +16,9 @@ import ( "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/ethminer" "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/logger" + "github.com/ethereum/go-ethereum/miner" "github.com/ethereum/go-ethereum/rpc" "github.com/ethereum/go-ethereum/wire" "github.com/ethereum/go-ethereum/xeth" @@ -252,10 +252,10 @@ func StartRpc(ethereum *eth.Ethereum, RpcPort int) { } } -var miner *ethminer.Miner +var gminer *miner.Miner -func GetMiner() *ethminer.Miner { - return miner +func GetMiner() *miner.Miner { + return gminer } func StartMining(ethereum *eth.Ethereum) bool { @@ -265,15 +265,15 @@ func StartMining(ethereum *eth.Ethereum) bool { go func() { clilogger.Infoln("Start mining") - if miner == nil { - miner = ethminer.NewDefaultMiner(addr, ethereum) + if gminer == nil { + gminer = miner.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() + gminer.Start() }() RegisterInterrupt(func(os.Signal) { StopMining(ethereum) @@ -297,8 +297,8 @@ func FormatTransactionData(data string) []byte { } func StopMining(ethereum *eth.Ethereum) bool { - if ethereum.Mining && miner != nil { - miner.Stop() + if ethereum.Mining && gminer != nil { + gminer.Stop() clilogger.Infoln("Stopped mining") ethereum.Mining = false |