transactionrelay

package
v0.11.12 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2022 License: ISC Imports: 11 Imported by: 0

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
	SharedRequestedTransactions() *flowcontext.SharedRequestedTransactions
	OnTransactionAddedToMempool()
	EnqueueTransactionIDsForPropagation(transactionIDs []*externalapi.DomainTransactionID) error
}

TransactionsRelayContext is the interface for the context needed for the HandleRelayedTransactions and HandleRequestedTransactions flows.

Jump to

Keyboard shortcuts

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