diff options
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/mist/assets/examples/coin.html | 1 | ||||
-rw-r--r-- | cmd/mist/assets/qml/main.qml | 4 | ||||
-rw-r--r-- | cmd/mist/assets/qml/views/miner.qml | 24 | ||||
-rw-r--r-- | cmd/mist/gui.go | 2 | ||||
-rw-r--r-- | cmd/mist/ui_lib.go | 19 |
5 files changed, 39 insertions, 11 deletions
diff --git a/cmd/mist/assets/examples/coin.html b/cmd/mist/assets/examples/coin.html index 99e0c7643..ca7a9c0dd 100644 --- a/cmd/mist/assets/examples/coin.html +++ b/cmd/mist/assets/examples/coin.html @@ -117,7 +117,6 @@ refresh(); </script> - </html> <!-- diff --git a/cmd/mist/assets/qml/main.qml b/cmd/mist/assets/qml/main.qml index 2b56b7236..dce279518 100644 --- a/cmd/mist/assets/qml/main.qml +++ b/cmd/mist/assets/qml/main.qml @@ -289,6 +289,7 @@ ApplicationWindow { styleColor: "#797979" } + /* Label { //y: 6 objectName: "miningLabel" @@ -307,6 +308,7 @@ ApplicationWindow { anchors.right: peerGroup.left anchors.rightMargin: 5 } + */ ProgressBar { visible: false @@ -1101,4 +1103,4 @@ ApplicationWindow { addrField.focus = true } } - }
\ No newline at end of file + } diff --git a/cmd/mist/assets/qml/views/miner.qml b/cmd/mist/assets/qml/views/miner.qml index 193ce37be..0938644b9 100644 --- a/cmd/mist/assets/qml/views/miner.qml +++ b/cmd/mist/assets/qml/views/miner.qml @@ -14,6 +14,30 @@ Rectangle { color: "#00000000" + Label { + visible: false + id: lastBlockLabel + objectName: "lastBlockLabel" + text: "---" + font.pixelSize: 10 + anchors.right: peerGroup.left + anchors.rightMargin: 5 + onTextChanged: { + //menuItem.secondaryTitle = text + } + } + + Label { + objectName: "miningLabel" + visible: false + font.pixelSize: 10 + anchors.right: lastBlockLabel.left + anchors.rightMargin: 5 + onTextChanged: { + menuItem.secondaryTitle = text + } + } + ColumnLayout { spacing: 10 anchors.fill: parent diff --git a/cmd/mist/gui.go b/cmd/mist/gui.go index dee99859c..6d179eea1 100644 --- a/cmd/mist/gui.go +++ b/cmd/mist/gui.go @@ -452,7 +452,7 @@ func (gui *Gui) update() { case <-generalUpdateTicker.C: statusText := "#" + gui.eth.ChainManager().CurrentBlock().Number().String() lastBlockLabel.Set("text", statusText) - miningLabel.Set("text", "Mining @ "+strconv.FormatInt(gui.uiLib.miner.GetPow().GetHashrate(), 10)+"Khash") + miningLabel.Set("text", "Mining @ "+strconv.FormatInt(gui.uiLib.miner.HashRate(), 10)+"/Khash") /* blockLength := gui.eth.BlockPool().BlocksProcessed diff --git a/cmd/mist/ui_lib.go b/cmd/mist/ui_lib.go index ba3ac3b61..ab48386f4 100644 --- a/cmd/mist/ui_lib.go +++ b/cmd/mist/ui_lib.go @@ -209,17 +209,20 @@ func (self *UiLib) Call(params map[string]interface{}) (string, error) { } func (self *UiLib) AddLocalTransaction(to, data, gas, gasPrice, value string) int { - return self.miner.AddLocalTx(&miner.LocalTx{ - To: ethutil.Hex2Bytes(to), - Data: ethutil.Hex2Bytes(data), - Gas: gas, - GasPrice: gasPrice, - Value: value, - }) - 1 + return 0 + /* + return self.miner.AddLocalTx(&miner.LocalTx{ + To: ethutil.Hex2Bytes(to), + Data: ethutil.Hex2Bytes(data), + Gas: gas, + GasPrice: gasPrice, + Value: value, + }) - 1 + */ } func (self *UiLib) RemoveLocalTransaction(id int) { - self.miner.RemoveLocalTx(id) + //self.miner.RemoveLocalTx(id) } func (self *UiLib) SetGasPrice(price string) { |