@@ -150,10 +150,14 @@ func (gui *Gui) ToggleMining() {
150
150
if gui .eth .Mining {
151
151
utils .StopMining (gui .eth )
152
152
txt = "Start mining"
153
+
154
+ gui .getObjectByName ("miningLabel" ).Set ("visible" , false )
153
155
} else {
154
156
utils .StartMining (gui .eth )
155
157
gui .miner = utils .GetMiner ()
156
158
txt = "Stop mining"
159
+
160
+ gui .getObjectByName ("miningLabel" ).Set ("visible" , true )
157
161
}
158
162
159
163
gui .win .Root ().Set ("miningButtonText" , txt )
@@ -415,6 +419,7 @@ func (gui *Gui) update() {
415
419
gui .getObjectByName ("syncProgressIndicator" ).Set ("visible" , ! gui .eth .IsUpToDate ())
416
420
417
421
lastBlockLabel := gui .getObjectByName ("lastBlockLabel" )
422
+ miningLabel := gui .getObjectByName ("miningLabel" )
418
423
419
424
go func () {
420
425
for {
@@ -476,13 +481,12 @@ func (gui *Gui) update() {
476
481
}
477
482
case <- generalUpdateTicker .C :
478
483
statusText := "#" + gui .eth .BlockChain ().CurrentBlock .Number .String ()
484
+ lastBlockLabel .Set ("text" , statusText )
485
+
479
486
if gui .miner != nil {
480
487
pow := gui .miner .GetPow ()
481
- if pow .GetHashrate () != 0 {
482
- statusText = "Mining @ " + strconv .FormatInt (pow .GetHashrate (), 10 ) + "Khash - " + statusText
483
- }
488
+ miningLabel .Set ("text" , "Mining @ " + strconv .FormatInt (pow .GetHashrate (), 10 )+ "Khash" )
484
489
}
485
- lastBlockLabel .Set ("text" , statusText )
486
490
}
487
491
}
488
492
}()
@@ -548,6 +552,10 @@ func (gui *Gui) GetCustomIdentifier() string {
548
552
return gui .clientIdentity .GetCustomIdentifier ()
549
553
}
550
554
555
+ func (gui * Gui ) ToggleTurboMining () {
556
+ gui .miner .ToggleTurbo ()
557
+ }
558
+
551
559
// functions that allow Gui to implement interface ethlog.LogSystem
552
560
func (gui * Gui ) SetLogLevel (level ethlog.LogLevel ) {
553
561
gui .logLevel = level
0 commit comments