aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaran <maran.hidskes@gmail.com>2014-07-18 18:29:14 +0800
committerMaran <maran.hidskes@gmail.com>2014-07-18 18:29:14 +0800
commit0c5a747ef1e9f64f7c5627256b87ed47d23438db (patch)
tree01be188d79fe985105f9d4b335f8ddd9d5dff009
parent75df148ba2644b6f862c7a78599a7b83177fb456 (diff)
downloadgo-tangerine-0c5a747ef1e9f64f7c5627256b87ed47d23438db.tar.gz
go-tangerine-0c5a747ef1e9f64f7c5627256b87ed47d23438db.tar.zst
go-tangerine-0c5a747ef1e9f64f7c5627256b87ed47d23438db.zip
Add mining hash to GUI
-rw-r--r--ethereal/gui.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/ethereal/gui.go b/ethereal/gui.go
index cfe5e2269..d816a774f 100644
--- a/ethereal/gui.go
+++ b/ethereal/gui.go
@@ -14,6 +14,7 @@ import (
"github.com/ethereum/go-ethereum/utils"
"github.com/go-qml/qml"
"math/big"
+ "strconv"
"strings"
"time"
)
@@ -369,11 +370,14 @@ func (gui *Gui) update() {
}
case <-generalUpdateTicker.C:
+ statusText := "#" + gui.eth.BlockChain().CurrentBlock.Number.String()
if gui.miner != nil {
pow := gui.miner.GetPow()
- fmt.Println("HashRate from miner", pow.GetHashrate())
+ if pow.GetHashrate() != 0 {
+ statusText = "Mining @ " + strconv.FormatInt(pow.GetHashrate(), 10) + "Khash - " + statusText
+ }
}
- lastBlockLabel.Set("text", "#"+gui.eth.BlockChain().CurrentBlock.Number.String())
+ lastBlockLabel.Set("text", statusText)
}
}
}