iterator

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: LGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Iterator

type Iterator interface {
	// Each calls `fn` for each tick of transactions it queries. An optional "ranges" may be given which will control
	// the start and end ticks queried. If neither are supplied, each will call `fn` from tick 0 to the last tick stored
	// onchain. If only a single number is supplied, `Each` assumes this to be the tick from which to start the queries.
	// If both are supplied, `Each` will call `fn` for ticks ranges[0] and ranges[1] (inclusive).
	Each(fn func(batch []*TxBatch, tick, timestamp uint64) error, ranges ...uint64) error
}

Iterator provides functionality to iterate over transactions stored onchain.

func New

func New(
	getMessageByID func(id types.MessageID) (types.Message, bool),
	namespace string,
	querier shard.TransactionHandlerClient,
) Iterator

type TxBatch

type TxBatch struct {
	Tx       *sign.Transaction
	MsgID    types.MessageID
	MsgValue any
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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