Versions in this module Expand all Collapse all v0 v0.38.78 Jul 18, 2023 v0.38.77 Jul 18, 2023 Changes in this version + const MaxActiveIDs + const MempoolChannel + const MetricsSubsystem + const PeerCatchupSleepIntervalMS + const UnknownPeerID + var ErrTxInCache = errors.New("tx already exists in cache") + func IsPreCheckError(err error) bool + type CListMempool struct + func NewCListMempool(cfg *config.MempoolConfig, proxyAppConn proxy.AppConnMempool, height int64, ...) *CListMempool + func (mem *CListMempool) CheckTx(tx types.Tx, cb func(*abci.ResponseCheckTx), txInfo TxInfo) error + func (mem *CListMempool) EnableTxsAvailable() + func (mem *CListMempool) Flush() + func (mem *CListMempool) FlushAppConn() error + func (mem *CListMempool) Lock() + func (mem *CListMempool) ReapMaxBytesMaxGas(maxBytes, maxGas int64) types.Txs + func (mem *CListMempool) ReapMaxTxs(max int) types.Txs + func (mem *CListMempool) RemoveTxByKey(txKey types.TxKey) error + func (mem *CListMempool) SetLogger(l log.Logger) + func (mem *CListMempool) Size() int + func (mem *CListMempool) SizeBytes() int64 + func (mem *CListMempool) TxsAvailable() <-chan struct{} + func (mem *CListMempool) TxsFront() *clist.CElement + func (mem *CListMempool) TxsWaitChan() <-chan struct{} + func (mem *CListMempool) Unlock() + func (mem *CListMempool) Update(height int64, txs types.Txs, txResults []*abci.ExecTxResult, ...) error + type CListMempoolOption func(*CListMempool) + func WithMetrics(metrics *Metrics) CListMempoolOption + func WithPostCheck(f PostCheckFunc) CListMempoolOption + func WithPreCheck(f PreCheckFunc) CListMempoolOption + type ErrMempoolIsFull struct + MaxTxs int + MaxTxsBytes int64 + NumTxs int + TxsBytes int64 + func (e ErrMempoolIsFull) Error() string + type ErrPreCheck struct + Reason error + func (e ErrPreCheck) Error() string + type ErrTxTooLarge struct + Actual int + Max int + func (e ErrTxTooLarge) Error() string + type LRUTxCache struct + func NewLRUTxCache(cacheSize int) *LRUTxCache + func (c *LRUTxCache) GetList() *list.List + func (c *LRUTxCache) Has(tx types.Tx) bool + func (c *LRUTxCache) Push(tx types.Tx) bool + func (c *LRUTxCache) Remove(tx types.Tx) + func (c *LRUTxCache) Reset() + type Mempool interface + CheckTx func(tx types.Tx, callback func(*abci.ResponseCheckTx), txInfo TxInfo) error + EnableTxsAvailable func() + Flush func() + FlushAppConn func() error + Lock func() + ReapMaxBytesMaxGas func(maxBytes, maxGas int64) types.Txs + ReapMaxTxs func(max int) types.Txs + RemoveTxByKey func(txKey types.TxKey) error + Size func() int + SizeBytes func() int64 + TxsAvailable func() <-chan struct{} + Unlock func() + Update func(blockHeight int64, blockTxs types.Txs, deliverTxResponses []*abci.ExecTxResult, ...) error + type Metrics struct + EvictedTxs metrics.Counter + FailedTxs metrics.Counter + RecheckTimes metrics.Counter + RejectedTxs metrics.Counter + Size metrics.Gauge + TxSizeBytes metrics.Histogram + func NopMetrics() *Metrics + func PrometheusMetrics(namespace string, labelsAndValues ...string) *Metrics + type NopTxCache struct + func (NopTxCache) Has(types.Tx) bool + func (NopTxCache) Push(types.Tx) bool + func (NopTxCache) Remove(types.Tx) + func (NopTxCache) Reset() + type PeerState interface + GetHeight func() int64 + type PostCheckFunc func(types.Tx, *abci.ResponseCheckTx) error + func PostCheckMaxGas(maxGas int64) PostCheckFunc + type PreCheckFunc func(types.Tx) error + func PreCheckMaxBytes(maxBytes int64) PreCheckFunc + type Reactor struct + func NewReactor(config *cfg.MempoolConfig, mempool *CListMempool) *Reactor + func (memR *Reactor) AddPeer(peer p2p.Peer) + func (memR *Reactor) GetChannels() []*p2p.ChannelDescriptor + func (memR *Reactor) InitPeer(peer p2p.Peer) p2p.Peer + func (memR *Reactor) OnStart() error + func (memR *Reactor) Receive(e p2p.Envelope) + func (memR *Reactor) RemovePeer(peer p2p.Peer, _ interface{}) + func (memR *Reactor) SetLogger(l log.Logger) + type TxCache interface + Has func(tx types.Tx) bool + Push func(tx types.Tx) bool + Remove func(tx types.Tx) + Reset func() + type TxInfo struct + SenderID uint16 + SenderP2PID p2p.ID + type TxKey [sha256.Size]byte + type TxsMessage struct + Txs []types.Tx + func (m *TxsMessage) String() string