Documentation
¶
Index ¶
- Variables
- func IsBadTx(err error) bool
- func IsTxRejected(err error) bool
- type Options
- type TxEvent
- type TxPool
- func (p *TxPool) Add(newTx cmttypes.Tx) error
- func (p *TxPool) All() []*txObject
- func (p *TxPool) Close()
- func (p *TxPool) Dump() types.Transactions
- func (p *TxPool) Executables() types.Transactions
- func (p *TxPool) Fill(txs types.Transactions, executed func(txID []byte) bool)
- func (p *TxPool) Get(id []byte) cmttypes.Tx
- func (p *TxPool) GetNewTxFeed() chan []byte
- func (p *TxPool) GetTxObj(id []byte) *txObject
- func (p *TxPool) Len() int
- func (p *TxPool) Remove(id []byte) bool
- func (p *TxPool) StrictlyAdd(newTx cmttypes.Tx) error
- func (p *TxPool) SubscribeTxEvent(ch chan *TxEvent) event.Subscription
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultTxPoolOptions = Options{ Limit: 200000, LimitPerAccount: 1024, MaxLifetime: 20 * time.Minute, }
Functions ¶
func IsTxRejected ¶
IsTxRejected returns whether the given error indicates tx is rejected.
Types ¶
type TxPool ¶
type TxPool struct {
// contains filtered or unexported fields
}
TxPool maintains unprocessed transactions.
func (*TxPool) Add ¶
Add add new tx into pool. It's not assumed as an error if the tx to be added is already in the pool,
func (*TxPool) Executables ¶
func (p *TxPool) Executables() types.Transactions
Executables returns executable txs.
func (*TxPool) Fill ¶
func (p *TxPool) Fill(txs types.Transactions, executed func(txID []byte) bool)
Fill fills txs into pool.
func (*TxPool) GetNewTxFeed ¶
func (*TxPool) StrictlyAdd ¶
StrictlyAdd add new tx into pool. A rejection error will be returned, if tx is not executable at this time.
func (*TxPool) SubscribeTxEvent ¶
func (p *TxPool) SubscribeTxEvent(ch chan *TxEvent) event.Subscription
SubscribeTxEvent receivers will receive a tx
Click to show internal directories.
Click to hide internal directories.