Versions in this module Expand all Collapse all v0 v0.0.1 Jan 19, 2022 Changes in this version + const MempoolChannel + const MetricsSubsystem + const TxKeySize + const UnknownPeerID + var ErrTxInCache = errors.New("tx already exists in cache") + func IsPreCheckError(err error) bool + func TxKey(tx types.Tx) [TxKeySize]byte + type CListMempool struct + func NewCListMempool(config *cfg.MempoolConfig, proxyAppConn proxy.AppConnMempool, height int64, ...) *CListMempool + func (mem *CListMempool) CheckTx(tx types.Tx, cb func(*abci.Response), txInfo TxInfo) error + func (mem *CListMempool) CloseWAL() + func (mem *CListMempool) EnableTxsAvailable() + func (mem *CListMempool) Flush() + func (mem *CListMempool) FlushAppConn() error + func (mem *CListMempool) InitWAL() 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 [TxKeySize]byte, removeFromCache bool) + func (mem *CListMempool) SetLogger(l log.Logger) + func (mem *CListMempool) Size() int + func (mem *CListMempool) TxsAvailable() <-chan struct{} + func (mem *CListMempool) TxsBytes() int64 + 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, deliverTxResponses []*abci.ResponseDeliverTx, ...) error + type CListMempoolOption func(*CListMempool) + func WithMetrics(metrics *Metrics) CListMempoolOption + func WithPostCheck(f PostCheckFunc) CListMempoolOption + func WithPreCheck(f PreCheckFunc) CListMempoolOption + type ErrMempoolIsFull struct + func (e ErrMempoolIsFull) Error() string + type ErrPreCheck struct + Reason error + func (e ErrPreCheck) Error() string + type ErrTxTooLarge struct + func (e ErrTxTooLarge) Error() string + type Mempool interface + CheckTx func(tx types.Tx, callback func(*abci.Response), txInfo TxInfo) error + CloseWAL func() + EnableTxsAvailable func() + Flush func() + FlushAppConn func() error + InitWAL func() error + Lock func() + ReapMaxBytesMaxGas func(maxBytes, maxGas int64) types.Txs + ReapMaxTxs func(max int) types.Txs + Size func() int + TxsAvailable func() <-chan struct{} + TxsBytes func() int64 + Unlock func() + Update func(blockHeight int64, blockTxs types.Txs, ...) error + type Metrics struct + FailedTxs metrics.Counter + RecheckTimes metrics.Counter + Size metrics.Gauge + TxSizeBytes metrics.Histogram + func NopMetrics() *Metrics + func PrometheusMetrics(namespace string, labelsAndValues ...string) *Metrics + 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(chID byte, src p2p.Peer, msgBytes []byte) + func (memR *Reactor) RemovePeer(peer p2p.Peer, reason interface{}) + func (memR *Reactor) SetLogger(l log.Logger) + type TxInfo struct + SenderID uint16 + SenderP2PID p2p.ID + type TxsMessage struct + Txs []types.Tx + func (m *TxsMessage) String() string