Documentation ¶
Index ¶
- func Add(db sql.Executor, lid types.LayerID, bid types.BlockID, tx *types.Transaction) error
- func Applied(db sql.Executor, id types.TransactionID) error
- func FilterByAddress(db sql.Executor, from, to types.LayerID, address types.Address) ([]*types.MeshTransaction, error)
- func FilterByDestination(db sql.Executor, from, to types.LayerID, address types.Address) ([]*types.MeshTransaction, error)
- func FilterByOrigin(db sql.Executor, from, to types.LayerID, address types.Address) ([]*types.MeshTransaction, error)
- func FilterPending(db sql.Executor, address types.Address) ([]*types.MeshTransaction, error)
- func Get(db sql.Executor, id types.TransactionID) (tx *types.MeshTransaction, err error)
- func GetBlob(db sql.Executor, id types.TransactionID) (buf []byte, err error)
- func Has(db sql.Executor, id types.TransactionID) (bool, error)
- func MarkDeleted(db sql.Executor, id types.TransactionID) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
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 ¶
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 MarkDeleted ¶
func MarkDeleted(db sql.Executor, id types.TransactionID) error
MarkDeleted marks transaction as deleted.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.