diff options
author | Felix Lange <fjl@twurst.com> | 2016-10-17 22:13:50 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2016-10-18 10:57:47 +0800 |
commit | 177cab5fe70910ee0af3fcf493d51999ae2d923d (patch) | |
tree | 54a8c78b9e2a25880b1d9cc284affad7d0830d33 /trie/hasher.go | |
parent | 187d6a66a5176a1dc3e75d5ad4baad623762acb9 (diff) | |
download | dexon-177cab5fe70910ee0af3fcf493d51999ae2d923d.tar dexon-177cab5fe70910ee0af3fcf493d51999ae2d923d.tar.gz dexon-177cab5fe70910ee0af3fcf493d51999ae2d923d.tar.bz2 dexon-177cab5fe70910ee0af3fcf493d51999ae2d923d.tar.lz dexon-177cab5fe70910ee0af3fcf493d51999ae2d923d.tar.xz dexon-177cab5fe70910ee0af3fcf493d51999ae2d923d.tar.zst dexon-177cab5fe70910ee0af3fcf493d51999ae2d923d.zip |
trie: ensure resolved nodes stay loaded
Commit 40cdcf1183 broke the optimisation which kept nodes resolved
during Get in the trie. The decoder assigned cache generation 0
unconditionally, causing resolved nodes to get flushed on Commit.
This commit fixes it and adds two tests.
Diffstat (limited to 'trie/hasher.go')
-rw-r--r-- | trie/hasher.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/trie/hasher.go b/trie/hasher.go index e395e00d7..57e156ebf 100644 --- a/trie/hasher.go +++ b/trie/hasher.go @@ -58,7 +58,7 @@ func (h *hasher) hash(n node, db DatabaseWriter, force bool) (node, node, error) return hash, n, nil } if n.canUnload(h.cachegen, h.cachelimit) { - // Evict the node from cache. All of its subnodes will have a lower or equal + // Unload the node from cache. All of its subnodes will have a lower or equal // cache generation number. return hash, hash, nil } |