Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BigNumEqual ¶ added in v0.2.8
BigNumEqual returns true if x and y are equivalent ie. both nil or both contain the same value.
func IsForkTransition ¶
IsForkTransition returns true if [fork] activates during the transition from [parent] to [current]. Note: this works for both block number and timestamp activated forks.
Types ¶
type MeteredCache ¶ added in v0.4.1
type MeteredCache struct {
// contains filtered or unexported fields
}
MeteredCache wraps *fastcache.Cache and periodically pulls stats from it.
func NewMeteredCache ¶ added in v0.4.1
func NewMeteredCache(size int, namespace string) *MeteredCache
NewMeteredCache returns a new MeteredCache that will update stats to the provided namespace once per each [updateFrequency] operations. Note: if [updateFrequency] is passed as 0, it will be treated as 1.
func (*MeteredCache) Del ¶ added in v0.4.1
func (mc *MeteredCache) Del(k []byte)
func (*MeteredCache) Get ¶ added in v0.4.1
func (mc *MeteredCache) Get(k []byte) []byte
func (*MeteredCache) Set ¶ added in v0.4.1
func (mc *MeteredCache) Set(k, v []byte)
Click to show internal directories.
Click to hide internal directories.