Skip to main content

Module bits

Module bits 

Source
Expand description

Bitwise comparison operations used by avalanche consensus.

Structs§

Set64
Set that can contain uints in the range [0, 64). All functions are O(1). The zero value is the empty set. ref. https://pkg.go.dev/github.com/ava-labs/avalanchego/ids#BitSet64

Enums§

Bit

Constants§

NUM_BITS

Functions§

equal_subset
Returns “true” if two Ids are equal for the range [start, stop). This does bit-per-bit comparison for the Id type of [u8; ID_LEN]. ref. https://pkg.go.dev/github.com/ava-labs/avalanchego/ids#EqualSubset
first_difference_subset
Returns the “id1” index of the first different bit in the range [start, stop). This does bit-per-bit comparison for the Id type of [u8; ID_LEN]. ref. https://pkg.go.dev/github.com/ava-labs/avalanchego/ids#FirstDifferenceSubset