Documentation
¶
Overview ¶
Package data defines common data types for transaction identifiers and related operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TxID ¶
type TxID []byte
TxID represents a transaction id.
type TxIDSet ¶
type TxIDSet []TxID
TxIDSet is a set of transaction IDs optimized for small sizes.
func NewTxIDSet ¶
NewTxIDSet creates a TxIDSet containing the given transaction IDs, deduplicating any repeats.
func TxIDSetDiff ¶
TxIDSetDiff is a set difference between a and b. It returns a new set where all elements of b have been removed from a.
func TxIDSetIntersect ¶
TxIDSetIntersect is a set intersection between a and b. It returns a new set with only elements common between a and b.
func TxIDSetUnion ¶
TxIDSetUnion returns a new set with the elements of both a and b.
func (TxIDSet) Add ¶
Add inserts a transaction ID into the set, returning the updated set and whether it was added.
func (TxIDSet) AddMulti ¶
AddMulti inserts multiple transaction IDs into the set, deduplicating any repeats.