diff options
author | Felix Lange <fjl@twurst.com> | 2017-04-18 19:37:10 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2017-04-25 08:14:31 +0800 |
commit | a13e920af01692cb07a520cda688f1cc5b5469dd (patch) | |
tree | 2321214787947ca0b4f302225aa2950617dd5cdd /core/state/statedb.go | |
parent | f958d7d4822d257598ae36fc3b381040faa5bb30 (diff) | |
download | dexon-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.go | 2 |
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)) |