util

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2025 License: LGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Alarm

func Alarm(ctx context.Context, msg string)

func FromHexString

func FromHexString(data string) []byte

FromHexString returns a byte array given a hex string

func HashToByte

func HashToByte(h common.Hash) []byte

func Init added in v1.2.0

func Init(env, hooks string)

func Key2Hex added in v1.2.0

func Key2Hex(str []byte, proofLength int) []byte

Types

type Bitvector512

type Bitvector512 []byte

func NewBitvector512

func NewBitvector512(data []byte) Bitvector512

func (Bitvector512) Count

func (b Bitvector512) Count() uint64

Count returns the number of 1s in the bitvector.

func (Bitvector512) Len

func (b Bitvector512) Len() uint64

Len returns the number of bits in the bitvector.

type RWMap added in v1.2.2

type RWMap struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewRWMap added in v1.2.2

func NewRWMap() *RWMap

func (*RWMap) Delete added in v1.2.2

func (m *RWMap) Delete(k string)

func (*RWMap) Each added in v1.2.2

func (m *RWMap) Each(f func(k string, v int64) bool)

func (*RWMap) Get added in v1.2.2

func (m *RWMap) Get(k string) (int64, bool)

func (*RWMap) Len added in v1.2.2

func (m *RWMap) Len() int

func (*RWMap) Set added in v1.2.2

func (m *RWMap) Set(k string, v int64)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL