diff options
author | Péter Szilágyi <peterke@gmail.com> | 2018-11-15 20:42:19 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-15 20:42:19 +0800 |
commit | 17d67c5834679f2b27ef08eddfce3b3a154a96a8 (patch) | |
tree | 3989575655db27f02641bf1fc7d96f87a9441ebb /trie/iterator_test.go | |
parent | 14346e4ef97ca812fb9f1d5d2cd87021c0155cf6 (diff) | |
parent | 434dd5bc0067cdf604d84426df9086015721dd36 (diff) | |
download | dexon-17d67c5834679f2b27ef08eddfce3b3a154a96a8.tar dexon-17d67c5834679f2b27ef08eddfce3b3a154a96a8.tar.gz dexon-17d67c5834679f2b27ef08eddfce3b3a154a96a8.tar.bz2 dexon-17d67c5834679f2b27ef08eddfce3b3a154a96a8.tar.lz dexon-17d67c5834679f2b27ef08eddfce3b3a154a96a8.tar.xz dexon-17d67c5834679f2b27ef08eddfce3b3a154a96a8.tar.zst dexon-17d67c5834679f2b27ef08eddfce3b3a154a96a8.zip |
Merge pull request #18087 from karalabe/trie-read-cacher
cmd, core, eth, light, trie: add trie read caching layer
Diffstat (limited to 'trie/iterator_test.go')
-rw-r--r-- | trie/iterator_test.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/trie/iterator_test.go b/trie/iterator_test.go index 2a510b1c2..4f633b195 100644 --- a/trie/iterator_test.go +++ b/trie/iterator_test.go @@ -113,7 +113,7 @@ func TestNodeIteratorCoverage(t *testing.T) { t.Errorf("failed to retrieve reported node %x: %v", hash, err) } } - for hash, obj := range db.nodes { + for hash, obj := range db.dirties { if obj != nil && hash != (common.Hash{}) { if _, ok := hashes[hash]; !ok { t.Errorf("state entry not reported %x", hash) @@ -333,8 +333,8 @@ func testIteratorContinueAfterError(t *testing.T, memonly bool) { } } if memonly { - robj = triedb.nodes[rkey] - delete(triedb.nodes, rkey) + robj = triedb.dirties[rkey] + delete(triedb.dirties, rkey) } else { rval, _ = diskdb.Get(rkey[:]) diskdb.Delete(rkey[:]) @@ -350,7 +350,7 @@ func testIteratorContinueAfterError(t *testing.T, memonly bool) { // Add the node back and continue iteration. if memonly { - triedb.nodes[rkey] = robj + triedb.dirties[rkey] = robj } else { diskdb.Put(rkey[:], rval) } @@ -393,8 +393,8 @@ func testIteratorContinueAfterSeekError(t *testing.T, memonly bool) { barNodeObj *cachedNode ) if memonly { - barNodeObj = triedb.nodes[barNodeHash] - delete(triedb.nodes, barNodeHash) + barNodeObj = triedb.dirties[barNodeHash] + delete(triedb.dirties, barNodeHash) } else { barNodeBlob, _ = diskdb.Get(barNodeHash[:]) diskdb.Delete(barNodeHash[:]) @@ -411,7 +411,7 @@ func testIteratorContinueAfterSeekError(t *testing.T, memonly bool) { } // Reinsert the missing node. if memonly { - triedb.nodes[barNodeHash] = barNodeObj + triedb.dirties[barNodeHash] = barNodeObj } else { diskdb.Put(barNodeHash[:], barNodeBlob) } |