Documentation ¶
Overview ¶
Package dispatch
@author: xwc1125
Package dispatch ¶
@author: xwc1125
Package dispatch ¶
@author: xwc1125
Package dispatch ¶
@author: xwc1125
Index ¶
- func NewApps(nodeKey protocol.NodeKey) protocol.Apps
- func NewDefaultTxPool(txType types.TxType, config protocol.Config, app protocol.Application, ...) (protocol.TxPool, error)
- func NewTxPools(rootCtx context.Context, opts ...TxPoolsOption) (protocol.TxPools, error)
- type TxPools
- func (p *TxPools) Add(peerId *models.P2PID, tx models.Transaction) (err error)
- func (p *TxPools) Delete(txType types.TxType, txs []models.Transaction, noErr bool) error
- func (p *TxPools) DeleteOne(tx models.Transaction, noErr bool) error
- func (p *TxPools) Fallback(txType types.TxType, txs []models.Transaction) error
- func (p *TxPools) FetchTxs(txsLimit uint64, headerTimestamp uint64) models.Transactions
- func (p *TxPools) Get(txType types.TxType, hash types.Hash) (models.Transaction, models.TxStatus)
- func (p *TxPools) GetTxs(txsLimit uint64) map[types.TxType][]models.Transaction
- func (p *TxPools) Len() map[types.TxType]uint64
- func (p *TxPools) Register(txType types.TxType, txPool protocol.TxPool)
- func (p *TxPools) Start() (err error)
- func (p *TxPools) Stop() (err error)
- func (p *TxPools) Subscribe(ch chan []models.Transaction) event.Subscription
- func (p *TxPools) TxPool(txType types.TxType) (protocol.TxPool, error)
- type TxPoolsOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDefaultTxPool ¶
func NewTxPools ¶
Types ¶
type TxPools ¶
type TxPools struct {
// contains filtered or unexported fields
}
func (*TxPools) FetchTxs ¶
func (p *TxPools) FetchTxs(txsLimit uint64, headerTimestamp uint64) models.Transactions
func (*TxPools) Subscribe ¶
func (p *TxPools) Subscribe(ch chan []models.Transaction) event.Subscription
Subscribe 订阅
type TxPoolsOption ¶
func WithApps ¶
func WithApps(apps protocol.Apps) TxPoolsOption
func WithBlockReader ¶
func WithBlockReader(blockReader protocol.BlockReader) TxPoolsOption
func WithBroadcaster ¶
func WithBroadcaster(broadcaster protocol.Broadcaster) TxPoolsOption
func WithConfig ¶
func WithConfig(config protocol.Config) TxPoolsOption
Click to show internal directories.
Click to hide internal directories.