diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-04-25 16:10:21 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-25 16:10:20 +0800 |
commit | ba3bcd16a6d99bc0e58516556df8e96b730c2d60 (patch) | |
tree | e6622b6dd3ca30a28ea68ad69d0d1b2d675b7bb3 /core/state/dump.go | |
parent | 7cc6abeef6ec0b6c5fd5a94920fa79157cdfcd37 (diff) | |
parent | 207bd7d2cddbf16ac2cb870fd6a1c558f02fd8ac (diff) | |
download | dexon-ba3bcd16a6d99bc0e58516556df8e96b730c2d60.tar dexon-ba3bcd16a6d99bc0e58516556df8e96b730c2d60.tar.gz dexon-ba3bcd16a6d99bc0e58516556df8e96b730c2d60.tar.bz2 dexon-ba3bcd16a6d99bc0e58516556df8e96b730c2d60.tar.lz dexon-ba3bcd16a6d99bc0e58516556df8e96b730c2d60.tar.xz dexon-ba3bcd16a6d99bc0e58516556df8e96b730c2d60.tar.zst dexon-ba3bcd16a6d99bc0e58516556df8e96b730c2d60.zip |
Merge pull request #14350 from fjl/trie-iterator-skip-2
eth: add debug_storageRangeAt
Diffstat (limited to 'core/state/dump.go')
-rw-r--r-- | core/state/dump.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/state/dump.go b/core/state/dump.go index 8294d61b9..ffa1a7283 100644 --- a/core/state/dump.go +++ b/core/state/dump.go @@ -22,6 +22,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/rlp" + "github.com/ethereum/go-ethereum/trie" ) type DumpAccount struct { @@ -44,7 +45,7 @@ func (self *StateDB) RawDump() Dump { Accounts: make(map[string]DumpAccount), } - it := self.trie.Iterator() + it := trie.NewIterator(self.trie.NodeIterator(nil)) for it.Next() { addr := self.trie.GetKey(it.Key) var data Account @@ -61,7 +62,7 @@ func (self *StateDB) RawDump() Dump { Code: common.Bytes2Hex(obj.Code(self.db)), Storage: make(map[string]string), } - storageIt := obj.getTrie(self.db).Iterator() + storageIt := trie.NewIterator(obj.getTrie(self.db).NodeIterator(nil)) for storageIt.Next() { account.Storage[common.Bytes2Hex(self.trie.GetKey(storageIt.Key))] = common.Bytes2Hex(storageIt.Value) } |