transactions

package
v0.2.14-beta.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(db sql.Executor, lid types.LayerID, bid types.BlockID, tx *types.Transaction) error

Add pending transaction to the database. If transaction already exists layer and block will be updated.

func Applied

func Applied(db sql.Executor, id types.TransactionID) error

Applied update transaction when it is no longer pending.

func FilterByAddress

func FilterByAddress(db sql.Executor, from, to types.LayerID, address types.Address) ([]*types.MeshTransaction, error)

FilterByAddress finds all transactions for an address.

func FilterByDestination

func FilterByDestination(db sql.Executor, from, to types.LayerID, address types.Address) ([]*types.MeshTransaction, error)

FilterByDestination filter transaction by destnation [from, to] layers.

func FilterByOrigin

func FilterByOrigin(db sql.Executor, from, to types.LayerID, address types.Address) ([]*types.MeshTransaction, error)

FilterByOrigin filter transaction by origin [from, to] layers.

func FilterPending

func FilterPending(db sql.Executor, address types.Address) ([]*types.MeshTransaction, error)

FilterPending filters all transactions that are not yet applied.

func Get

func Get(db sql.Executor, id types.TransactionID) (tx *types.MeshTransaction, err error)

Get transaction from database.

func GetBlob

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

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

func Has

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

Has returns true if transaction is stored in the database.

func MarkDeleted

func MarkDeleted(db sql.Executor, id types.TransactionID) error

MarkDeleted marks transaction as deleted.

Types

This section is empty.

Jump to

Keyboard shortcuts

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