Documentation ¶
Index ¶
- func IncrOne(bytes []byte)
- func IsForkTransition(fork *big.Int, parent *big.Int, current *big.Int) bool
- func IsForked(s, head *big.Int) bool
- type MeteredCache
- func (mc *MeteredCache) Del(k []byte)
- func (mc *MeteredCache) Get(dst, k []byte) []byte
- func (mc *MeteredCache) GetBig(dst, k []byte) []byte
- func (mc *MeteredCache) Has(k []byte) bool
- func (mc *MeteredCache) HasGet(dst, k []byte) ([]byte, bool)
- func (mc *MeteredCache) Set(k, v []byte)
- func (mc *MeteredCache) SetBig(k, v []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ¶
MeteredCache wraps *fastcache.Cache and periodically pulls stats from it.
func NewMeteredCache ¶
func NewMeteredCache(size int, journal string, namespace string, updateFrequency uint64) *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 ¶
func (mc *MeteredCache) Del(k []byte)
func (*MeteredCache) Get ¶
func (mc *MeteredCache) Get(dst, k []byte) []byte
func (*MeteredCache) GetBig ¶
func (mc *MeteredCache) GetBig(dst, k []byte) []byte
func (*MeteredCache) Has ¶
func (mc *MeteredCache) Has(k []byte) bool
func (*MeteredCache) Set ¶
func (mc *MeteredCache) Set(k, v []byte)
func (*MeteredCache) SetBig ¶
func (mc *MeteredCache) SetBig(k, v []byte)
Click to show internal directories.
Click to hide internal directories.