trie: ensure resolved nodes stay loaded
Commit 40cdcf11 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.
Showing
- trie/hasher.go 1 addition, 1 deletiontrie/hasher.go
- trie/node.go 13 additions, 13 deletionstrie/node.go
- trie/proof.go 1 addition, 1 deletiontrie/proof.go
- trie/sync.go 3 additions, 3 deletionstrie/sync.go
- trie/trie.go 7 additions, 4 deletionstrie/trie.go
- trie/trie_test.go 70 additions, 21 deletionstrie/trie_test.go
Loading
Please register or sign in to comment