aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/mist/ui_lib.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-03-12 06:35:34 +0800
committerFelix Lange <fjl@twurst.com>2015-03-12 06:43:27 +0800
commitd7b5a87b3bc4a19677877d3a8c8c925211eb25f1 (patch)
treef43c6b29c27dd29cc366788353650faa1d45e7bb /cmd/mist/ui_lib.go
parent5a9f712144058c576d14b0d27ff2d2d270cd6d27 (diff)
downloadgo-tangerine-d7b5a87b3bc4a19677877d3a8c8c925211eb25f1.tar.gz
go-tangerine-d7b5a87b3bc4a19677877d3a8c8c925211eb25f1.tar.zst
go-tangerine-d7b5a87b3bc4a19677877d3a8c8c925211eb25f1.zip
miner: provide coinbase when starting the miner
This avoids having to query the coinbase when creating the miner, which in turn eliminates the dreaded startup error when no accounts are set up. Later, this will also allow us to simply restart the miner when the user picks a different coinbase. This causes a lot of changes in other packages. These are included in this commit because they're impossible to separate.
Diffstat (limited to 'cmd/mist/ui_lib.go')
-rw-r--r--cmd/mist/ui_lib.go18
1 files changed, 4 insertions, 14 deletions
diff --git a/cmd/mist/ui_lib.go b/cmd/mist/ui_lib.go
index 4198c6316..2679e0f95 100644
--- a/cmd/mist/ui_lib.go
+++ b/cmd/mist/ui_lib.go
@@ -175,22 +175,12 @@ func (self *UiLib) RemoveLocalTransaction(id int) {
//self.miner.RemoveLocalTx(id)
}
-func (self *UiLib) SetGasPrice(price string) {
- self.Miner().MinAcceptedGasPrice = ethutil.Big(price)
-}
-
-func (self *UiLib) SetExtra(extra string) {
- self.Miner().Extra = extra
-}
-
func (self *UiLib) ToggleMining() bool {
- if !self.Miner().Mining() {
- self.Miner().Start()
-
- return true
+ if !self.eth.IsMining() {
+ err := self.eth.StartMining()
+ return err == nil
} else {
- self.Miner().Stop()
-
+ self.eth.StopMining()
return false
}
}