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
474c85bc
Commit
474c85bc
authored
May 27, 2014
by
Maran
Browse files
Options
Browse Files
Download
Plain Diff
Fix merge conflict
parents
f7eb4e58
d694e00a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
64 additions
and
47 deletions
+64
-47
wallet.qml
ethereal/assets/qml/wallet.qml
+44
-31
samplecoin.html
ethereal/assets/samplecoin/samplecoin.html
+1
-1
gui.go
ethereal/ui/gui.go
+1
-1
ui_lib.go
ethereal/ui/ui_lib.go
+18
-14
No files found.
ethereal/assets/qml/wallet.qml
View file @
474c85bc
...
...
@@ -505,7 +505,7 @@ ApplicationWindow {
}
Window
{
Application
Window
{
id
:
debugWindow
visible
:
false
title
:
"Debugger"
...
...
@@ -543,36 +543,49 @@ ApplicationWindow {
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
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"
}
model
:
stackModel
}
}
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
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
:
parent
.
width
}
model
:
stackModel
}
}
}
}
}
statusBar
:
StatusBar
{
RowLayout
{
anchors.fill
:
parent
Button
{
property
var
enabled
:
true
id
:
debugNextButton
onClicked
:
{
ui
.
next
()
}
text
:
"Next"
}
}
}
...
...
ethereal/assets/samplecoin/samplecoin.html
View file @
474c85bc
...
...
@@ -9,7 +9,7 @@
<script
type=
"text/javascript"
>
var
jefcoinAddr
=
"
fc0a9436890478bb9b1c6ed7455c2535366f4a9
9"
var
jefcoinAddr
=
"
518546ffa883dcc838a64bc2dabada0fd64af45
9"
var
mAddr
=
""
function
createTransaction
()
{
...
...
ethereal/ui/gui.go
View file @
474c85bc
...
...
@@ -130,7 +130,7 @@ func (gui *Gui) createWindow(comp qml.Object) *qml.Window {
gui
.
win
=
win
gui
.
uiLib
.
win
=
win
db
:=
&
Debugger
{
gui
.
win
,
make
(
chan
bool
)}
db
:=
&
Debugger
{
gui
.
win
,
make
(
chan
bool
)
,
true
}
gui
.
lib
.
Db
=
db
gui
.
uiLib
.
Db
=
db
...
...
ethereal/ui/ui_lib.go
View file @
474c85bc
...
...
@@ -6,9 +6,7 @@ import (
"github.com/ethereum/eth-go"
"github.com/ethereum/eth-go/ethchain"
"github.com/ethereum/eth-go/ethutil"
"github.com/ethereum/go-ethereum/utils"
"github.com/go-qml/qml"
"github.com/obscuren/mutan"
"os"
"path"
"path/filepath"
...
...
@@ -121,27 +119,28 @@ func DefaultAssetPath() string {
func
(
ui
*
UiLib
)
DebugTx
(
recipient
,
valueStr
,
gasStr
,
gasPriceStr
,
data
string
)
{
state
:=
ui
.
eth
.
BlockChain
()
.
CurrentBlock
.
State
()
mainInput
,
_
:=
mutan
.
PreParse
(
data
)
callerScript
,
err
:=
utils
.
Compile
(
mainInput
)
script
,
err
:=
ethutil
.
Compile
(
data
)
if
err
!=
nil
{
ethutil
.
Config
.
Log
.
Debugln
(
err
)
return
}
dis
:=
ethchain
.
Disassemble
(
callerS
cript
)
dis
:=
ethchain
.
Disassemble
(
s
cript
)
ui
.
win
.
Root
()
.
Call
(
"clearAsm"
)
for
_
,
str
:=
range
dis
{
ui
.
win
.
Root
()
.
Call
(
"setAsm"
,
str
)
}
callerTx
:=
ethchain
.
NewContractCreationTx
(
ethutil
.
Big
(
valueStr
),
ethutil
.
Big
(
gasStr
),
ethutil
.
Big
(
gasPriceStr
),
nil
)
// Contract addr as test address
keyPair
:=
ethutil
.
GetKeyRing
()
.
Get
(
0
)
callerTx
:=
ethchain
.
NewContractCreationTx
(
ethutil
.
Big
(
valueStr
),
ethutil
.
Big
(
gasStr
),
ethutil
.
Big
(
gasPriceStr
),
script
)
callerTx
.
Sign
(
keyPair
.
PrivateKey
)
account
:=
ui
.
eth
.
StateManager
()
.
TransState
()
.
GetStateObject
(
keyPair
.
Address
())
c
:=
ethchain
.
MakeContract
(
callerTx
,
state
)
callerClosure
:=
ethchain
.
NewClosure
(
account
,
c
,
c
.
Scrip
t
(),
state
,
ethutil
.
Big
(
gasStr
),
ethutil
.
Big
(
gasPriceStr
))
c
ontract
:=
ethchain
.
MakeContract
(
callerTx
,
state
)
callerClosure
:=
ethchain
.
NewClosure
(
account
,
c
ontract
,
contract
.
Ini
t
(),
state
,
ethutil
.
Big
(
gasStr
),
ethutil
.
Big
(
gasPriceStr
))
block
:=
ui
.
eth
.
BlockChain
()
.
CurrentBlock
vm
:=
ethchain
.
NewVm
(
state
,
ui
.
eth
.
StateManager
(),
ethchain
.
RuntimeVars
{
...
...
@@ -151,23 +150,28 @@ func (ui *UiLib) DebugTx(recipient, valueStr, gasStr, gasPriceStr, data string)
Coinbase
:
block
.
Coinbase
,
Time
:
block
.
Time
,
Diff
:
block
.
Difficulty
,
TxData
:
nil
,
})
ui
.
Db
.
done
=
false
go
func
()
{
callerClosure
.
Call
(
vm
,
nil
,
ui
.
Db
.
halting
)
callerClosure
.
Call
(
vm
,
contract
.
Init
()
,
ui
.
Db
.
halting
)
state
.
Reset
()
ui
.
Db
.
done
=
true
}()
}
func
(
ui
*
UiLib
)
Next
()
{
ui
.
Db
.
Next
()
if
!
ui
.
Db
.
done
{
ui
.
Db
.
Next
()
}
}
type
Debugger
struct
{
win
*
qml
.
Window
N
chan
bool
win
*
qml
.
Window
N
chan
bool
done
bool
}
func
(
d
*
Debugger
)
halting
(
pc
int
,
op
ethchain
.
OpCode
,
mem
*
ethchain
.
Memory
,
stack
*
ethchain
.
Stack
)
{
...
...
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