Versions in this module Expand all Collapse all v0 v0.34.11 Aug 6, 2021 Changes in this version + const MaxActiveIDs + const MempoolChannel + const MetricsSubsystem + const PeerCatchupSleepIntervalMS + const TxKeySize + const UnknownPeerID + func TxHashFromBytes(tx []byte) []byte + func TxKey(tx types.Tx) [TxKeySize]byte + type LRUTxCache struct + func NewLRUTxCache(cacheSize int) *LRUTxCache + func (c *LRUTxCache) GetList() *list.List + func (c *LRUTxCache) Push(tx types.Tx) bool + func (c *LRUTxCache) Remove(tx types.Tx) + func (c *LRUTxCache) Reset() + type Mempool interface + CheckTx func(ctx context.Context, tx types.Tx, callback func(*abci.Response), 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 + Size func() int + SizeBytes func() int64 + TxsAvailable func() <-chan struct{} + Unlock func() + Update func(blockHeight int64, blockTxs types.Txs, ...) error + type MempoolIDs struct + func NewMempoolIDs() *MempoolIDs + func (ids *MempoolIDs) GetForPeer(peerID types.NodeID) uint16 + func (ids *MempoolIDs) Reclaim(peerID types.NodeID) + func (ids *MempoolIDs) ReserveForPeer(peerID types.NodeID) + 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) Push(types.Tx) bool + func (NopTxCache) Remove(types.Tx) + func (NopTxCache) Reset() + 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 TxCache interface + Push func(tx types.Tx) bool + Remove func(tx types.Tx) + Reset func() + type TxInfo struct + SenderID uint16 + SenderNodeID types.NodeID