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
ace55103
Commit
ace55103
authored
Aug 14, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert to hex
parent
c7ee9844
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
types.go
ethpub/types.go
+5
-4
No files found.
ethpub/types.go
View file @
ace55103
...
@@ -221,15 +221,16 @@ func (self *PStateObject) EachStorage(cb ethtrie.EachCallback) {
...
@@ -221,15 +221,16 @@ func (self *PStateObject) EachStorage(cb ethtrie.EachCallback) {
}
}
type
KeyVal
struct
{
type
KeyVal
struct
{
Key
string
Key
string
`json:"key"`
Value
string
Value
string
`json:"value"`
}
}
func
(
c
*
PStateObject
)
StateKeyVal
(
asJson
bool
)
interface
{}
{
func
(
c
*
PStateObject
)
StateKeyVal
(
asJson
bool
)
interface
{}
{
var
values
[]
KeyVal
var
values
[]
KeyVal
if
c
.
object
!=
nil
{
if
c
.
object
!=
nil
{
c
.
object
.
EachStorage
(
func
(
name
string
,
value
*
ethutil
.
Value
)
{
c
.
object
.
EachStorage
(
func
(
name
string
,
value
*
ethutil
.
Value
)
{
values
=
append
(
values
,
KeyVal
{
name
,
ethutil
.
Bytes2Hex
(
value
.
Bytes
())})
value
.
Decode
()
values
=
append
(
values
,
KeyVal
{
ethutil
.
Bytes2Hex
([]
byte
(
name
)),
ethutil
.
Bytes2Hex
(
value
.
Bytes
())})
})
})
}
}
...
@@ -238,7 +239,7 @@ func (c *PStateObject) StateKeyVal(asJson bool) interface{} {
...
@@ -238,7 +239,7 @@ func (c *PStateObject) StateKeyVal(asJson bool) interface{} {
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
return
nil
}
}
fmt
.
Println
(
string
(
valuesJson
))
return
string
(
valuesJson
)
return
string
(
valuesJson
)
}
}
...
...
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