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
0972bded
Commit
0972bded
authored
Jan 02, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed using new trie iterator API
parent
1cc86c07
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
22 deletions
+22
-22
debugger.go
cmd/mist/debugger.go
+5
-3
gui.go
cmd/mist/gui.go
+17
-19
No files found.
cmd/mist/debugger.go
View file @
0972bded
...
...
@@ -309,9 +309,11 @@ func (d *Debugger) halting(pc int, op vm.OpCode, mem *vm.Memory, stack *vm.Stack
d
.
win
.
Root
()
.
Call
(
"setStack"
,
val
.
String
())
}
stateObject
.
EachStorage
(
func
(
key
string
,
node
*
ethutil
.
Value
)
{
d
.
win
.
Root
()
.
Call
(
"setStorage"
,
storeVal
{
fmt
.
Sprintf
(
"% x"
,
key
),
fmt
.
Sprintf
(
"% x"
,
node
.
Str
())})
})
it
:=
stateObject
.
Trie
()
.
Iterator
()
for
it
.
Next
()
{
d
.
win
.
Root
()
.
Call
(
"setStorage"
,
storeVal
{
fmt
.
Sprintf
(
"% x"
,
it
.
Key
),
fmt
.
Sprintf
(
"% x"
,
it
.
Value
)})
}
stackFrameAt
:=
new
(
big
.
Int
)
.
SetBytes
(
mem
.
Get
(
0
,
32
))
psize
:=
mem
.
Len
()
-
int
(
new
(
big
.
Int
)
.
SetBytes
(
mem
.
Get
(
0
,
32
))
.
Uint64
())
...
...
cmd/mist/gui.go
View file @
0972bded
...
...
@@ -231,35 +231,33 @@ func (gui *Gui) loadAddressBook() {
view
:=
gui
.
getObjectByName
(
"infoView"
)
nameReg
:=
gui
.
pipe
.
World
()
.
Config
()
.
Get
(
"NameReg"
)
if
nameReg
!=
nil
{
nameReg
.
EachStorage
(
func
(
name
string
,
value
*
ethutil
.
Value
)
{
if
name
[
0
]
!=
0
{
value
.
Decode
()
view
.
Call
(
"addAddress"
,
struct
{
Name
,
Address
string
}{
name
,
ethutil
.
Bytes2Hex
(
value
.
Bytes
())})
it
:=
nameReg
.
Trie
()
.
Iterator
()
for
it
.
Next
()
{
if
it
.
Key
[
0
]
!=
0
{
view
.
Call
(
"addAddress"
,
struct
{
Name
,
Address
string
}{
string
(
it
.
Key
),
ethutil
.
Bytes2Hex
(
it
.
Value
)})
}
})
}
}
}
func
(
self
*
Gui
)
loadMergedMiningOptions
()
{
view
:=
self
.
getObjectByName
(
"mergedMiningModel"
)
nameRe
g
:=
self
.
pipe
.
World
()
.
Config
()
.
Get
(
"MergeMining"
)
if
nameRe
g
!=
nil
{
mergeMinin
g
:=
self
.
pipe
.
World
()
.
Config
()
.
Get
(
"MergeMining"
)
if
mergeMinin
g
!=
nil
{
i
:=
0
nameReg
.
EachStorage
(
func
(
name
string
,
value
*
ethutil
.
Value
)
{
if
name
[
0
]
!=
0
{
value
.
Decode
()
it
:=
mergeMining
.
Trie
()
.
Iterator
()
for
it
.
Next
()
{
view
.
Call
(
"addMergedMiningOption"
,
struct
{
Checked
bool
Name
,
Address
string
Id
,
ItemId
int
}{
false
,
string
(
it
.
Key
),
ethutil
.
Bytes2Hex
(
it
.
Value
),
0
,
i
})
view
.
Call
(
"addMergedMiningOption"
,
struct
{
Checked
bool
Name
,
Address
string
Id
,
ItemId
int
}{
false
,
name
,
ethutil
.
Bytes2Hex
(
value
.
Bytes
()),
0
,
i
})
i
++
i
++
}
})
}
}
}
...
...
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