func (gui *Gui) ToggleMining() { var txt string if gui.eth.Mining { utils.StopMining(gui.eth) txt = "Start mining" } else { utils.StartMining(gui.eth) gui.miner = utils.GetMiner() txt = "Stop mining" } gui.win.Root().Set("miningButtonText", txt) }
func (gui *Gui) ToggleMining() { var txt string if gui.eth.Mining { utils.StopMining(gui.eth) txt = "Start mining" gui.getObjectByName("miningLabel").Set("visible", false) } else { utils.StartMining(gui.eth) gui.miner = utils.GetMiner() txt = "Stop mining" gui.getObjectByName("miningLabel").Set("visible", true) } gui.win.Root().Set("miningButtonText", txt) }
func (self *JSRE) stopMining(call otto.FunctionCall) otto.Value { v, _ := self.vm.ToValue(utils.StopMining(self.ethereum)) return v }