Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
6d171ff5
Commit
6d171ff5
authored
Aug 21, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Turbo mining flag
parent
48a99d23
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
4 deletions
+36
-4
wallet.qml
ethereal/assets/qml/wallet.qml
+24
-0
gui.go
ethereal/gui.go
+12
-4
No files found.
ethereal/assets/qml/wallet.qml
View file @
6d171ff5
...
...
@@ -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
{
...
...
@@ -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
...
...
ethereal/gui.go
View file @
6d171ff5
...
...
@@ -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
)
...
...
@@ -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
{
...
...
@@ -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
)
}
}
}()
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment