notifymgr

package
v0.10.6 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: ISC Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NotifyMgr

type NotifyMgr struct {
	Server    *p2p.Service
	RpcServer *rpc.RpcServer
}

NotifyMgr manage message announce & relay & notification between mempool, websocket, gbt long pull and rpc server.

func (*NotifyMgr) AddRebroadcastInventory added in v0.10.1

func (ntmgr *NotifyMgr) AddRebroadcastInventory(newTxs []*types.TxDesc)

func (*NotifyMgr) AnnounceNewTransactions

func (ntmgr *NotifyMgr) AnnounceNewTransactions(newTxs []*types.TxDesc, filters []peer.ID)

AnnounceNewTransactions generates and relays inventory vectors and notifies both websocket and getblocktemplate long poll clients of the passed transactions. This function should be called whenever new transactions are added to the mempool.

func (*NotifyMgr) BroadcastMessage

func (ntmgr *NotifyMgr) BroadcastMessage(data interface{})

func (*NotifyMgr) RelayInventory

func (ntmgr *NotifyMgr) RelayInventory(data interface{}, filters []peer.ID)

RelayInventory relays the passed inventory vector to all connected peers that are not already known to have it.

func (*NotifyMgr) TransactionConfirmed added in v0.10.1

func (ntmgr *NotifyMgr) TransactionConfirmed(tx *types.Tx)

Transaction has one confirmation on the main chain. Now we can mark it as no longer needing rebroadcasting.

Jump to

Keyboard shortcuts

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