events

package
v0.43.0-dev-malleabili... Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2025 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultMaxHeightRange = 250

DefaultMaxHeightRange is the default maximum size of range requests.

Variables

This section is empty.

Functions

This section is empty.

Types

type Events

type Events struct {
	// contains filtered or unexported fields
}

func NewEventsBackend

func NewEventsBackend(
	log zerolog.Logger,
	state protocol.State,
	chain flow.Chain,
	maxHeightRange uint,
	headers storage.Headers,
	connFactory connection.ConnectionFactory,
	nodeCommunicator node_communicator.Communicator,
	queryMode query_mode.IndexQueryMode,
	eventsIndex *index.EventsIndex,
	execNodeIdentitiesProvider *rpc.ExecutionNodeIdentitiesProvider,
) (*Events, error)

func (*Events) GetEventsForBlockIDs

func (e *Events) GetEventsForBlockIDs(
	ctx context.Context,
	eventType string,
	blockIDs []flow.Identifier,
	requiredEventEncodingVersion entities.EventEncodingVersion,
) ([]flow.BlockEvents, error)

GetEventsForBlockIDs retrieves events for all the specified block IDs that have the given type

func (*Events) GetEventsForHeightRange

func (e *Events) GetEventsForHeightRange(
	ctx context.Context,
	eventType string,
	startHeight, endHeight uint64,
	requiredEventEncodingVersion entities.EventEncodingVersion,
) ([]flow.BlockEvents, error)

GetEventsForHeightRange retrieves events for all sealed blocks between the start block height and the end block height (inclusive) that have the given type.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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