cmd, core, eth, light, trie: add trie read caching layer

This commit is contained in:
Péter Szilágyi
2018-11-12 18:47:34 +02:00
parent 9a000601c6
commit 434dd5bc00
33 changed files with 1660 additions and 127 deletions

16
vendor/github.com/allegro/bigcache/utils.go generated vendored Normal file
View File

@ -0,0 +1,16 @@
package bigcache
func max(a, b int) int {
if a > b {
return a
}
return b
}
func convertMBToBytes(value int) int {
return value * 1024 * 1024
}
func isPowerOfTwo(number int) bool {
return (number & (number - 1)) == 0
}