Changed iterator
This commit is contained in:
1 parent
9f00aeae29
commit
93261b98c2
4 files changed
+31
-15
No files matched your search
+2
-2
@@ -215,7 +215,7 @@ func (c *PStateObject) IsContract() bool {
|
||||
}
|
||||
|
||||
func (self *PStateObject) EachStorage(cb ethtrie.EachCallback) {
|
||||
self.object.State().EachStorage(cb)
|
||||
self.object.EachStorage(cb)
|
||||
}
|
||||
|
||||
type KeyVal struct {
|
||||
@@ -226,7 +226,7 @@ type KeyVal struct {
|
||||
func (c *PStateObject) StateKeyVal(asJson bool) interface{} {
|
||||
var values []KeyVal
|
||||
if c.object != nil {
|
||||
c.object.State().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())})
|
||||
})
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user