atxs

package
v0.2.16-beta.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(db sql.Executor, atx *types.ActivationTx, timestamp time.Time) error

Add adds an ATX for a given ATX ID.

func DeleteATXsByNodeID

func DeleteATXsByNodeID(db sql.Executor, nodeID types.NodeID) error

DeleteATXsByNodeID deletes ATXs by node ID.

func Get

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

Get gets an ATX by a given ATX ID.

func GetBlob

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

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

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 GetTimestamp

func GetTimestamp(db sql.Executor, id types.ATXID) (timestamp time.Time, err error)

GetTimestamp gets an ATX timestamp by a given ATX ID.

func GetTop

func GetTop(db sql.Executor) (id types.ATXID, err error)

GetTop gets a top ATX (positioning ATX candidate) for a given ATX ID. The top ATX is the one with the highest layer 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 UpdateTopIfNeeded

func UpdateTopIfNeeded(db sql.Executor, atx *types.ActivationTx) error

UpdateTopIfNeeded updates top ATX if needed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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