ipld-eth-server/vendor/github.com/allegro/bigcache/utils.go
Edvard Hübinette d41209d293 VDB-327 Constantinople prep (#135)
* Bump geth to 1.8.20 for Constantinople

* Fix conflicting import/toml source for logrus
2019-01-14 11:31:28 +01:00

17 lines
228 B
Go

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
}