aboutsummaryrefslogtreecommitdiffstats
path: root/trie/iterator_test.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2018-11-13 00:47:34 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-11-15 18:22:13 +0800
commit434dd5bc0067cdf604d84426df9086015721dd36 (patch)
tree279d85e32a36b8804d60c5a4b83b444514850782 /trie/iterator_test.go
parent9a000601c6c4e4f8134caedba1957ffe28d2b659 (diff)
downloadgo-tangerine-434dd5bc0067cdf604d84426df9086015721dd36.tar.gz
go-tangerine-434dd5bc0067cdf604d84426df9086015721dd36.tar.zst
go-tangerine-434dd5bc0067cdf604d84426df9086015721dd36.zip
cmd, core, eth, light, trie: add trie read caching layer
Diffstat (limited to 'trie/iterator_test.go')
-rw-r--r--trie/iterator_test.go14
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)
}