Documentation ¶
Index ¶
Constants ¶
View Source
const ( // MaxTxSize is the maximum number of bytes a transaction can use to be // allowed into the mempool. MaxTxSize = 64 * units.KiB )
Variables ¶
Functions ¶
func NewMetrics ¶
func NewMetrics(namespace string, registerer prometheus.Registerer) (*metrics, error)
Types ¶
type Mempool ¶
type Mempool[T Tx] interface { Add(tx T) error Get(txID ids.ID) (T, bool) // Remove [txs] and any conflicts of [txs] from the mempool. Remove(txs ...T) // Peek returns the oldest tx in the mempool. Peek() (tx T, exists bool) // Iterate iterates over the txs until f returns false Iterate(f func(tx T) bool) // Note: dropped txs are added to droppedTxIDs but are not evicted from // unissued decision/staker txs. This allows previously dropped txs to be // possibly reissued. MarkDropped(txID ids.ID, reason error) GetDropReason(txID ids.ID) error // Len returns the number of txs in the mempool. Len() int }
Click to show internal directories.
Click to hide internal directories.