util

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0, MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BitFieldContainsAll

func BitFieldContainsAll(a, b BitField) (bool, error)

Checks whether bitfield `a` contains all bits set in bitfield `b`.

func BitFieldContainsAny

func BitFieldContainsAny(a, b BitField) (bool, error)

Checks whether bitfield `a` contains any bit that is set in bitfield `b`.

Types

type BitField

type BitField = bitfield.BitField

type BitfieldQueue

type BitfieldQueue struct {
	*adt.Array
	// contains filtered or unexported fields
}

Wrapper for working with an AMT[ChainEpoch]*Bitfield functioning as a queue, bucketed by epoch. Keys in the queue are quantized (upwards), modulo some offset, to reduce the cardinality of keys.

func LoadBitfieldQueue

func LoadBitfieldQueue(store adt.Store, root cid.Cid, quant builtin.QuantSpec, bitwidth int) (BitfieldQueue, error)

func (BitfieldQueue) ForEach

func (q BitfieldQueue) ForEach(cb func(epoch abi.ChainEpoch, bf bitfield.BitField) error) error

Iterates the queue.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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