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
098f7f23
Commit
098f7f23
authored
Jun 29, 2014
by
zelig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed name for ethutil hex functions; and access to keyring via keyManager
parent
8aea4687
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
8 deletions
+8
-8
debugger.go
ethereal/ui/debugger.go
+2
-2
ext_app.go
ethereal/ui/ext_app.go
+2
-2
html_container.go
ethereal/ui/html_container.go
+1
-1
qml_app.go
ethereal/ui/qml_app.go
+1
-1
ui_lib.go
ethereal/ui/ui_lib.go
+2
-2
No files found.
ethereal/ui/debugger.go
View file @
098f7f23
...
...
@@ -49,7 +49,7 @@ func (self *DebuggerWindow) SetData(data string) {
self
.
win
.
Set
(
"dataText"
,
data
)
}
func
(
self
*
DebuggerWindow
)
SetAsm
(
data
string
)
{
dis
:=
ethchain
.
Disassemble
(
ethutil
.
FromHex
(
data
))
dis
:=
ethchain
.
Disassemble
(
ethutil
.
Hex2Bytes
(
data
))
for
_
,
str
:=
range
dis
{
self
.
win
.
Root
()
.
Call
(
"setAsm"
,
str
)
}
...
...
@@ -101,7 +101,7 @@ func (self *DebuggerWindow) Debug(valueStr, gasStr, gasPriceStr, scriptStr, data
gasPrice
=
ethutil
.
Big
(
gasPriceStr
)
value
=
ethutil
.
Big
(
valueStr
)
// Contract addr as test address
keyPair
=
ethutil
.
GetKeyRing
()
.
Get
(
0
)
keyPair
=
self
.
lib
.
eth
.
KeyManager
()
.
KeyPair
(
)
callerTx
=
ethchain
.
NewContractCreationTx
(
ethutil
.
Big
(
valueStr
),
gas
,
gasPrice
,
script
)
)
callerTx
.
Sign
(
keyPair
.
PrivateKey
)
...
...
ethereal/ui/ext_app.go
View file @
098f7f23
...
...
@@ -121,10 +121,10 @@ out:
func
(
app
*
ExtApplication
)
Watch
(
addr
,
storageAddr
string
)
{
var
event
string
if
len
(
storageAddr
)
==
0
{
event
=
"object:"
+
string
(
ethutil
.
FromHex
(
addr
))
event
=
"object:"
+
string
(
ethutil
.
Hex2Bytes
(
addr
))
app
.
lib
.
eth
.
Reactor
()
.
Subscribe
(
event
,
app
.
changeChan
)
}
else
{
event
=
"storage:"
+
string
(
ethutil
.
FromHex
(
addr
))
+
":"
+
string
(
ethutil
.
FromHex
(
storageAddr
))
event
=
"storage:"
+
string
(
ethutil
.
Hex2Bytes
(
addr
))
+
":"
+
string
(
ethutil
.
Hex2Bytes
(
storageAddr
))
app
.
lib
.
eth
.
Reactor
()
.
Subscribe
(
event
,
app
.
changeChan
)
}
...
...
ethereal/ui/html_container.go
View file @
098f7f23
...
...
@@ -116,7 +116,7 @@ func (app *HtmlApplication) Window() *qml.Window {
}
func
(
app
*
HtmlApplication
)
NewBlock
(
block
*
ethchain
.
Block
)
{
b
:=
&
ethpub
.
PBlock
{
Number
:
int
(
block
.
BlockInfo
()
.
Number
),
Hash
:
ethutil
.
Hex
(
block
.
Hash
())}
b
:=
&
ethpub
.
PBlock
{
Number
:
int
(
block
.
BlockInfo
()
.
Number
),
Hash
:
ethutil
.
Bytes2
Hex
(
block
.
Hash
())}
app
.
webView
.
Call
(
"onNewBlockCb"
,
b
)
}
...
...
ethereal/ui/qml_app.go
View file @
098f7f23
...
...
@@ -38,7 +38,7 @@ func (app *QmlApplication) NewWatcher(quitChan chan bool) {
// Events
func
(
app
*
QmlApplication
)
NewBlock
(
block
*
ethchain
.
Block
)
{
pblock
:=
&
ethpub
.
PBlock
{
Number
:
int
(
block
.
BlockInfo
()
.
Number
),
Hash
:
ethutil
.
Hex
(
block
.
Hash
())}
pblock
:=
&
ethpub
.
PBlock
{
Number
:
int
(
block
.
BlockInfo
()
.
Number
),
Hash
:
ethutil
.
Bytes2
Hex
(
block
.
Hash
())}
app
.
win
.
Call
(
"onNewBlockCb"
,
pblock
)
}
...
...
ethereal/ui/ui_lib.go
View file @
098f7f23
...
...
@@ -77,9 +77,9 @@ func (ui *UiLib) AssetPath(p string) string {
func
(
self
*
UiLib
)
StartDbWithContractAndData
(
contractHash
,
data
string
)
{
dbWindow
:=
NewDebuggerWindow
(
self
)
object
:=
self
.
eth
.
StateManager
()
.
CurrentState
()
.
GetStateObject
(
ethutil
.
FromHex
(
contractHash
))
object
:=
self
.
eth
.
StateManager
()
.
CurrentState
()
.
GetStateObject
(
ethutil
.
Hex2Bytes
(
contractHash
))
if
len
(
object
.
Script
())
>
0
{
dbWindow
.
SetCode
(
"0x"
+
ethutil
.
Hex
(
object
.
Script
()))
dbWindow
.
SetCode
(
"0x"
+
ethutil
.
Bytes2
Hex
(
object
.
Script
()))
}
dbWindow
.
SetData
(
"0x"
+
data
)
...
...
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