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
e7c9b86a
Commit
e7c9b86a
authored
May 30, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved UI
* Added mining button
parent
0938b568
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
130 deletions
+47
-130
wallet.qml
ethereal/assets/qml/wallet.qml
+25
-123
config.go
ethereal/config.go
+3
-2
ethereum.go
ethereal/ethereum.go
+5
-3
gui.go
ethereal/ui/gui.go
+14
-0
cmd.go
utils/cmd.go
+0
-2
No files found.
ethereal/assets/qml/wallet.qml
View file @
e7c9b86a
...
...
@@ -10,6 +10,8 @@ import Ethereum 1.0
ApplicationWindow
{
id
:
root
property
alias
miningButtonText
:
miningButton
.
text
width
:
900
height
:
600
minimumHeight
:
300
...
...
@@ -27,13 +29,6 @@ ApplicationWindow {
}
Menu
{
title
:
"Tools"
MenuItem
{
text
:
"Muted"
shortcut
:
"Ctrl+e"
onTriggered
:
ui
.
muted
(
""
)
}
MenuItem
{
text
:
"Debugger"
shortcut
:
"Ctrl+d"
...
...
@@ -50,11 +45,6 @@ ApplicationWindow {
addPeerWin
.
visible
=
true
}
}
MenuItem
{
text
:
"Start"
onTriggered
:
ui
.
connect
()
}
}
Menu
{
...
...
@@ -310,8 +300,15 @@ ApplicationWindow {
}
statusBar
:
StatusBar
{
height
:
30
RowLayout
{
anchors.fill
:
parent
Button
{
id
:
miningButton
onClicked
:
{
eth
.
toggleMining
()
}
text
:
"Start Mining"
}
Button
{
property
var
enabled
:
true
...
...
@@ -335,8 +332,10 @@ ApplicationWindow {
anchors.leftMargin
:
5
id
:
walletValueLabel
}
}
Label
{
y
:
7
anchors.right
:
peerImage
.
left
anchors.rightMargin
:
5
id
:
peerLabel
...
...
@@ -344,13 +343,13 @@ ApplicationWindow {
text
:
"0 / 0"
}
Image
{
y
:
7
id
:
peerImage
anchors.right
:
parent
.
right
width
:
10
;
height
:
10
source
:
ui
.
assetPath
(
"network.png"
)
}
}
}
Window
{
id
:
popup
...
...
@@ -546,94 +545,6 @@ ApplicationWindow {
font.pointSize
:
12
text
:
"<h2>Ethereal</h2><br><h3>Development</h3>Jeffrey Wilcke<br>Maran Hidskes<br>"
}
}
ApplicationWindow
{
id
:
debugWindow
visible
:
false
title
:
"Debugger"
minimumWidth
:
600
minimumHeight
:
600
width
:
800
height
:
600
Item
{
id
:
keyHandler
focus
:
true
Keys.onPressed
:
{
if
(
event
.
key
==
Qt
.
Key_Space
)
{
ui
.
next
()
}
}
}
SplitView
{
anchors.fill
:
parent
property
var
asmModel
:
ListModel
{
id
:
asmModel
}
TableView
{
id
:
asmTableView
width
:
200
TableViewColumn
{
role
:
"value"
;
title
:
""
;
width
:
100
}
model
:
asmModel
}
Rectangle
{
anchors.left
:
asmTableView
.
right
anchors.right
:
parent
.
right
SplitView
{
orientation
:
Qt
.
Vertical
anchors.fill
:
parent
TableView
{
property
var
memModel
:
ListModel
{
id
:
memModel
}
height
:
parent
.
height
/
2
width
:
parent
.
width
TableViewColumn
{
id
:
mnumColmn
;
role
:
"num"
;
title
:
"#"
;
width
:
50
}
TableViewColumn
{
role
:
"value"
;
title
:
"Memory"
;
width
:
750
}
model
:
memModel
}
SplitView
{
orientation
:
Qt
.
Horizontal
id
:
debugSplitView
TableView
{
property
var
debuggerLog
:
ListModel
{
id
:
debuggerLog
}
TableViewColumn
{
role
:
"value"
;
title
:
"Debug messages"
}
model
:
debuggerLog
}
TableView
{
property
var
stackModel
:
ListModel
{
id
:
stackModel
}
height
:
parent
.
height
/
2
width
:
parent
.
width
TableViewColumn
{
role
:
"value"
;
title
:
"Stack"
;
width
:
debugSplitView
.
width
}
model
:
stackModel
}
}
}
}
}
statusBar
:
StatusBar
{
RowLayout
{
anchors.fill
:
parent
Button
{
property
var
enabled
:
true
id
:
debugNextButton
onClicked
:
{
ui
.
next
()
}
text
:
"Next"
}
}
}
}
function
addDebugMessage
(
message
){
...
...
@@ -887,15 +798,6 @@ ApplicationWindow {
mainContractColumn
.
state
=
"SETUP"
}
}
Button
{
id
:
debugButton
text
:
"Debug"
onClicked
:
{
var
res
=
ui
.
debugTx
(
""
,
txValue
.
text
,
txGas
.
text
,
txGasPrice
.
text
,
codeView
.
text
)
debugWindow
.
visible
=
true
}
}
}
}
...
...
ethereal/config.go
View file @
e7c9b86a
...
...
@@ -6,7 +6,8 @@ import (
var
Identifier
string
var
StartConsole
bool
var
StartMining
bool
//var StartMining bool
var
StartRpc
bool
var
RpcPort
int
var
UseUPnP
bool
...
...
@@ -24,7 +25,7 @@ var AssetPath string
func
Init
()
{
flag
.
StringVar
(
&
Identifier
,
"i"
,
""
,
"Custom client identifier"
)
flag
.
BoolVar
(
&
StartConsole
,
"c"
,
false
,
"debug and testing console"
)
flag
.
BoolVar
(
&
StartMining
,
"m"
,
false
,
"start dagger mining"
)
//
flag.BoolVar(&StartMining, "m", false, "start dagger mining")
flag
.
BoolVar
(
&
StartRpc
,
"r"
,
false
,
"start rpc server"
)
flag
.
BoolVar
(
&
ShowGenesis
,
"g"
,
false
,
"prints genesis header and exits"
)
flag
.
BoolVar
(
&
UseUPnP
,
"upnp"
,
false
,
"enable UPnP support"
)
...
...
ethereal/ethereum.go
View file @
e7c9b86a
...
...
@@ -108,9 +108,11 @@ save these words so you can restore your account later: %s
os
.
Exit
(
0
)
}
/*
if StartMining {
utils.DoMining(ethereum)
}
*/
if
StartRpc
{
utils
.
DoRpc
(
ethereum
,
RpcPort
)
...
...
ethereal/ui/gui.go
View file @
e7c9b86a
...
...
@@ -8,6 +8,7 @@ import (
"github.com/ethereum/eth-go/ethdb"
"github.com/ethereum/eth-go/ethpub"
"github.com/ethereum/eth-go/ethutil"
"github.com/ethereum/go-ethereum/utils"
"github.com/go-qml/qml"
"math/big"
"strings"
...
...
@@ -101,6 +102,19 @@ func (gui *Gui) Start(assetPath string) {
gui
.
eth
.
Stop
()
}
func
(
gui
*
Gui
)
ToggleMining
()
{
var
txt
string
if
gui
.
eth
.
Mining
{
utils
.
StopMining
(
gui
.
eth
)
txt
=
"Start mining"
}
else
{
utils
.
StartMining
(
gui
.
eth
)
txt
=
"Stop mining"
}
gui
.
win
.
Root
()
.
Set
(
"miningButtonText"
,
txt
)
}
func
(
gui
*
Gui
)
showWallet
(
context
*
qml
.
Context
)
(
*
qml
.
Window
,
error
)
{
component
,
err
:=
gui
.
engine
.
LoadFile
(
gui
.
uiLib
.
AssetPath
(
"qml/wallet.qml"
))
if
err
!=
nil
{
...
...
utils/cmd.go
View file @
e7c9b86a
...
...
@@ -33,8 +33,6 @@ func DoMining(ethereum *eth.Ethereum) {
addr
:=
keyPair
.
Address
()
go
func
()
{
ethutil
.
Config
.
Log
.
Infoln
(
"Miner started"
)
miner
=
ethminer
.
NewDefaultMiner
(
addr
,
ethereum
)
// Give it some time to connect with peers
...
...
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