Documentation ¶
Index ¶
- Constants
- type NotifyMgr
- func (ntmgr *NotifyMgr) AddRebroadcastInventory(newTxs []*types.TxDesc)
- func (ntmgr *NotifyMgr) AnnounceNewTransactions(newTxs []*types.TxDesc, filters []peer.ID)
- func (ntmgr *NotifyMgr) BroadcastMessage(data interface{})
- func (ntmgr *NotifyMgr) IsTimeout() bool
- func (ntmgr *NotifyMgr) RelayInventory(block *types.SerializedBlock, flags uint32, source *peer.ID)
- func (ntmgr *NotifyMgr) Reset()
- func (ntmgr *NotifyMgr) Start() error
- func (ntmgr *NotifyMgr) Stop() error
- func (ntmgr *NotifyMgr) TransactionConfirmed(tx *types.Tx)
- func (ntmgr *NotifyMgr) TransactionsConfirmed(txs []*types.Tx)
Constants ¶
View Source
const MaxNotifyProcessTimeout = time.Second * 30
View Source
const NotifyTickerDur = time.Second
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NotifyMgr ¶
type NotifyMgr struct { service.Service Server *p2p.Service RpcServer *rpc.RpcServer sync.Mutex // contains filtered or unexported fields }
NotifyMgr manage message announce & relay & notification between mempool, websocket, gbt long pull and rpc server.
func (*NotifyMgr) AddRebroadcastInventory ¶
func (*NotifyMgr) AnnounceNewTransactions ¶
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 ¶
RelayInventory relays the passed inventory vector to all connected peers that are not already known to have it.
func (*NotifyMgr) TransactionConfirmed ¶
Transaction has one confirmation on the main chain. Now we can mark it as no longer needing rebroadcasting.
func (*NotifyMgr) TransactionsConfirmed ¶ added in v1.2.0
Click to show internal directories.
Click to hide internal directories.