Documentation ¶
Index ¶
Constants ¶
View Source
const (
MempoolChannel = byte(0x30)
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reactor ¶
type Reactor struct { p2p.BaseReactor // contains filtered or unexported fields }
Reactor handles mempool tx broadcasting amongst peers. It maintains a map from peer ID to peer. Broadcasting is only outward to val network.
func NewReactor ¶
func NewReactor(config *cfg.MempoolConfig, localPeerID p2p.ID) *Reactor
NewReactor returns a new Reactor with the given config.
func (*Reactor) AddPeer ¶
AddPeer implements Reactor. It starts a broadcast routine ensuring all txs are forwarded to the given peer.
func (*Reactor) GetChannels ¶
func (memR *Reactor) GetChannels() []*p2p.ChannelDescriptor
GetChannels implements Reactor by returning the list of channels for this reactor.
func (*Reactor) Receive ¶
Receive implements Reactor. It adds any received transactions to the mempool.
func (*Reactor) RemovePeer ¶
RemovePeer implements Reactor.
Click to show internal directories.
Click to hide internal directories.