cmd, core, eth, light, trie: add trie read caching layer
This commit is contained in:
16
vendor/github.com/allegro/bigcache/utils.go
generated
vendored
Normal file
16
vendor/github.com/allegro/bigcache/utils.go
generated
vendored
Normal 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
|
||||
}
|
Reference in New Issue
Block a user