atxs

package
v0.3.1-beta.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

Add adds an ATX for a given ATX ID.

func Get

func Get(db sql.Executor, id types.ATXID) (atx *types.VerifiedActivationTx, err error)

Get gets an ATX by a given ATX ID.

func GetAtxIDWithMaxHeight

func GetAtxIDWithMaxHeight(db sql.Executor) (types.ATXID, error)

GetAtxIDWithMaxHeight returns the ID of the atx from the last epoch with the highest (or tied for the highest) tick height.

func GetBlob

func GetBlob(db sql.Executor, id []byte) (buf []byte, err error)

GetBlob loads ATX as an encoded blob, ready to be sent over the wire.

func GetByEpochAndNodeID

func GetByEpochAndNodeID(db sql.Executor, epoch types.EpochID, nodeID types.NodeID) (*types.VerifiedActivationTx, error)

GetByEpochAndNodeID gets any ATX by the specified NodeID in the given epoch.

func GetFirstIDByNodeID

func GetFirstIDByNodeID(db sql.Executor, nodeID types.NodeID) (id types.ATXID, err error)

GetFirstIDByNodeID gets the initial ATX ID for a given node ID.

func GetIDByEpochAndNodeID

func GetIDByEpochAndNodeID(db sql.Executor, epoch types.EpochID, nodeID types.NodeID) (id types.ATXID, err error)

GetIDByEpochAndNodeID gets an ATX ID for a given epoch and node ID.

func GetIDsByEpoch

func GetIDsByEpoch(db sql.Executor, epoch types.EpochID) (ids []types.ATXID, err error)

GetIDsByEpoch gets ATX IDs for a given epoch.

func GetLastIDByNodeID

func GetLastIDByNodeID(db sql.Executor, nodeID types.NodeID) (id types.ATXID, err error)

GetLastIDByNodeID gets the last ATX ID for a given node ID.

func Has

func Has(db sql.Executor, id types.ATXID) (bool, error)

Has checks if an ATX exists by a given ATX ID.

func VRFNonce

func VRFNonce(db sql.Executor, id types.NodeID, epoch types.EpochID) (nonce types.VRFPostIndex, err error)

VRFNonce gets the VRF nonce of a smesher for a given epoch.

Types

This section is empty.

Jump to

Keyboard shortcuts

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