dsl

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BatchIDResponse

func BatchIDResponse(m dsl.Module, dest t.ModuleID, batchID t.BatchID, origin *mppb.RequestBatchIDOrigin)

BatchIDResponse is a response to a RequestBatchID event.

func NewBatch

func NewBatch(m dsl.Module, dest t.ModuleID, txIDs []t.TxID, txs []*requestpb.Request, origin *mppb.RequestBatchOrigin)

NewBatch is a response to a RequestBatch event.

func RequestBatch

func RequestBatch[C any](m dsl.Module, dest t.ModuleID, context *C)

RequestBatch is used by the availability layer to request a new batch of transactions from the mempool.

func RequestBatchID

func RequestBatchID[C any](m dsl.Module, dest t.ModuleID, txIDs []t.TxID, context *C)

RequestBatchID allows other modules to request the mempool module to compute the ID of a batch. It is possible that some transactions in the batch are not present in the mempool.

func RequestTransactionIDs

func RequestTransactionIDs[C any](m dsl.Module, dest t.ModuleID, txs []*requestpb.Request, context *C)

RequestTransactionIDs allows other modules to request the mempool module to compute IDs for the given transactions. It is possible that some of these transactions are not present in the mempool.

func RequestTransactions

func RequestTransactions[C any](m dsl.Module, dest t.ModuleID, txIDs []t.TxID, context *C)

RequestTransactions allows the availability layer to request transactions from the mempool by their IDs. It is possible that some of these transactions are not present in the mempool.

func TransactionIDsResponse

func TransactionIDsResponse(m dsl.Module, dest t.ModuleID, txIDs []t.TxID, origin *mppb.RequestTransactionIDsOrigin)

TransactionIDsResponse is a response to a RequestTransactionIDs event.

func TransactionsResponse

func TransactionsResponse(m dsl.Module, dest t.ModuleID, present []bool, txs []*requestpb.Request, origin *mppb.RequestTransactionsOrigin)

TransactionsResponse is a response to a RequestTransactions event.

func UponBatchIDResponse

func UponBatchIDResponse[C any](m dsl.Module, handler func(batchID t.BatchID, context *C) error)

UponBatchIDResponse registers a handler for the BatchIDResponse events.

func UponEvent

func UponEvent[EvWrapper mppb.Event_TypeWrapper[Ev], Ev any](m dsl.Module, handler func(ev *Ev) error)

UponEvent registers a handler for the given mempool event type.

func UponNewBatch

func UponNewBatch[C any](m dsl.Module, handler func(txIDs []t.TxID, txs []*requestpb.Request, context *C) error)

UponNewBatch registers a handler for the NewBatch events.

func UponRequestBatch

func UponRequestBatch(m dsl.Module, handler func(origin *mppb.RequestBatchOrigin) error)

UponRequestBatch registers a handler for the RequestBatch events.

func UponRequestBatchID

func UponRequestBatchID(m dsl.Module, handler func(txIDs []t.TxID, origin *mppb.RequestBatchIDOrigin) error)

UponRequestBatchID registers a handler for the RequestBatchID events.

func UponRequestTransactionIDs

func UponRequestTransactionIDs(m dsl.Module, handler func(txs []*requestpb.Request, origin *mppb.RequestTransactionIDsOrigin) error)

UponRequestTransactionIDs registers a handler for the RequestTransactionIDs events.

func UponRequestTransactions

func UponRequestTransactions(m dsl.Module, handler func(txIDs []t.TxID, origin *mppb.RequestTransactionsOrigin) error)

UponRequestTransactions registers a handler for the RequestTransactions events.

func UponTransactionIDsResponse

func UponTransactionIDsResponse[C any](m dsl.Module, handler func(txIDs []t.TxID, context *C) error)

UponTransactionIDsResponse registers a handler for the TransactionIDsResponse events.

func UponTransactionsResponse

func UponTransactionsResponse[C any](m dsl.Module, handler func(present []bool, txs []*requestpb.Request, context *C) error)

UponTransactionsResponse registers a handler for the TransactionsResponse events.

Types

This section is empty.

Jump to

Keyboard shortcuts

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