Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleRelayedTransactions ¶
func HandleRelayedTransactions(context TransactionsRelayContext, incomingRoute *router.Route, outgoingRoute *router.Route) error
HandleRelayedTransactions listens to appmessage.MsgInvTransaction messages, requests their corresponding transactions if they are missing, adds them to the mempool and propagates them to the rest of the network.
func HandleRequestedTransactions ¶
func HandleRequestedTransactions(context TransactionsRelayContext, incomingRoute *router.Route, outgoingRoute *router.Route) error
HandleRequestedTransactions listens to appmessage.MsgRequestTransactions messages, responding with the requested transactions if those are in the mempool. Missing transactions would be ignored
Types ¶
type TransactionsRelayContext ¶
type TransactionsRelayContext interface { NetAdapter() *netadapter.NetAdapter Domain() domain.Domain OnTransactionAddedToMempool() EnqueueTransactionIDsForPropagation(transactionIDs []*externalapi.DomainTransactionID) error IsIBDRunning() bool }
TransactionsRelayContext is the interface for the context needed for the HandleRelayedTransactions and HandleRequestedTransactions flows.
Click to show internal directories.
Click to hide internal directories.