Skip to content

Commit

Permalink
Merge branch 'release/0.6.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
obscuren committed Aug 21, 2014
2 parents ed73fc0 + b849547 commit 7855a23
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Status](http://cpt-obvious.ethercasts.com:8010/buildstatusimage?builder=go-ether

Ethereum Go Client © 2014 Jeffrey Wilcke.

Current state: Proof of Concept 0.6.3.
Current state: Proof of Concept 0.6.4.

For the development package please see the [eth-go package](https://github.com/ethereum/eth-go).

Expand Down
24 changes: 24 additions & 0 deletions ethereal/assets/qml/wallet.qml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,21 @@ ApplicationWindow {
})
}
}

MenuSeparator {}

MenuItem {
id: miningSpeed
text: "Mining: Turbo"
onTriggered: {
gui.toggleTurboMining()
if(text == "Mining: Turbo") {
text = "Mining: Normal";
} else {
text = "Mining: Turbo";
}
}
}
}

Menu {
Expand Down Expand Up @@ -218,6 +233,15 @@ ApplicationWindow {
}
}

Label {
y: 6
objectName: "miningLabel"
visible: true
font.pixelSize: 10
anchors.right: lastBlockLabel.left
anchors.rightMargin: 5
}

Label {
y: 6
id: lastBlockLabel
Expand Down
16 changes: 12 additions & 4 deletions ethereal/gui.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,14 @@ func (gui *Gui) ToggleMining() {
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)
Expand Down Expand Up @@ -415,6 +419,7 @@ func (gui *Gui) update() {
gui.getObjectByName("syncProgressIndicator").Set("visible", !gui.eth.IsUpToDate())

lastBlockLabel := gui.getObjectByName("lastBlockLabel")
miningLabel := gui.getObjectByName("miningLabel")

go func() {
for {
Expand Down Expand Up @@ -476,13 +481,12 @@ func (gui *Gui) update() {
}
case <-generalUpdateTicker.C:
statusText := "#" + gui.eth.BlockChain().CurrentBlock.Number.String()
lastBlockLabel.Set("text", statusText)

if gui.miner != nil {
pow := gui.miner.GetPow()
if pow.GetHashrate() != 0 {
statusText = "Mining @ " + strconv.FormatInt(pow.GetHashrate(), 10) + "Khash - " + statusText
}
miningLabel.Set("text", "Mining @ "+strconv.FormatInt(pow.GetHashrate(), 10)+"Khash")
}
lastBlockLabel.Set("text", statusText)
}
}
}()
Expand Down Expand Up @@ -548,6 +552,10 @@ func (gui *Gui) GetCustomIdentifier() string {
return gui.clientIdentity.GetCustomIdentifier()
}

func (gui *Gui) ToggleTurboMining() {
gui.miner.ToggleTurbo()
}

// functions that allow Gui to implement interface ethlog.LogSystem
func (gui *Gui) SetLogLevel(level ethlog.LogLevel) {
gui.logLevel = level
Expand Down
2 changes: 1 addition & 1 deletion ethereal/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

const (
ClientIdentifier = "Ethereal"
Version = "0.6.3"
Version = "0.6.4"
)

var ethereum *eth.Ethereum
Expand Down
2 changes: 1 addition & 1 deletion ethereum/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

const (
ClientIdentifier = "Ethereum(G)"
Version = "0.6.3"
Version = "0.6.4"
)

var logger = ethlog.NewLogger("CLI")
Expand Down

0 comments on commit 7855a23

Please sign in to comment.