aboutsummaryrefslogtreecommitdiffstats
path: root/core/state/statedb.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2017-04-18 19:37:10 +0800
committerFelix Lange <fjl@twurst.com>2017-04-25 08:14:31 +0800
commita13e920af01692cb07a520cda688f1cc5b5469dd (patch)
tree2321214787947ca0b4f302225aa2950617dd5cdd /core/state/statedb.go
parentf958d7d4822d257598ae36fc3b381040faa5bb30 (diff)
downloaddexon-a13e920af01692cb07a520cda688f1cc5b5469dd.tar
dexon-a13e920af01692cb07a520cda688f1cc5b5469dd.tar.gz
dexon-a13e920af01692cb07a520cda688f1cc5b5469dd.tar.bz2
dexon-a13e920af01692cb07a520cda688f1cc5b5469dd.tar.lz
dexon-a13e920af01692cb07a520cda688f1cc5b5469dd.tar.xz
dexon-a13e920af01692cb07a520cda688f1cc5b5469dd.tar.zst
dexon-a13e920af01692cb07a520cda688f1cc5b5469dd.zip
trie: clean up iterator constructors
Make it so each iterator has exactly one public constructor: - NodeIterators can be created through a method. - Iterators can be created through NewIterator on any NodeIterator.
Diffstat (limited to 'core/state/statedb.go')
-rw-r--r--core/state/statedb.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/state/statedb.go b/core/state/statedb.go
index 0c72fc6b0..24381ced5 100644
--- a/core/state/statedb.go
+++ b/core/state/statedb.go
@@ -481,7 +481,7 @@ func (db *StateDB) ForEachStorage(addr common.Address, cb func(key, value common
cb(h, value)
}
- it := so.getTrie(db.db).Iterator()
+ it := trie.NewIterator(so.getTrie(db.db).NodeIterator())
for it.Next() {
// ignore cached values
key := common.BytesToHash(db.trie.GetKey(it.Key))