Versions in this module Expand all Collapse all v0 v0.0.4 Jul 18, 2024 v0.0.3 Jul 18, 2024 Changes in this version + var DefaultMaxTx = 0 + var ErrMempoolTxMaxCapacity = errors.New("pool reached max tx capacity") + var ErrTxNotFound = errors.New("tx not found in mempool") + func IsEmpty[C comparable](mempool Mempool) error + type DefaultSignerExtractionAdapter struct + func NewDefaultSignerExtractionAdapter() DefaultSignerExtractionAdapter + func (DefaultSignerExtractionAdapter) GetSigners(tx sdk.Tx) ([]SignerData, error) + type Iterator interface + Next func() Iterator + Tx func() sdk.Tx + type Mempool interface + CountTx func() int + Insert func(context.Context, sdk.Tx) error + Remove func(sdk.Tx) error + Select func(context.Context, [][]byte) Iterator + type NoOpMempool struct + func (NoOpMempool) CountTx() int + func (NoOpMempool) Insert(context.Context, sdk.Tx) error + func (NoOpMempool) Remove(sdk.Tx) error + func (NoOpMempool) Select(context.Context, [][]byte) Iterator + type PriorityNonceIterator struct + func (i *PriorityNonceIterator[C]) Next() Iterator + func (i *PriorityNonceIterator[C]) Tx() sdk.Tx + type PriorityNonceMempool struct + func DefaultPriorityMempool() *PriorityNonceMempool[int64] + func NewPriorityMempool[C comparable](cfg PriorityNonceMempoolConfig[C]) *PriorityNonceMempool[C] + func (mp *PriorityNonceMempool[C]) CountTx() int + func (mp *PriorityNonceMempool[C]) Insert(ctx context.Context, tx sdk.Tx) error + func (mp *PriorityNonceMempool[C]) NextSenderTx(sender string) sdk.Tx + func (mp *PriorityNonceMempool[C]) Remove(tx sdk.Tx) error + func (mp *PriorityNonceMempool[C]) Select(_ context.Context, _ [][]byte) Iterator + type PriorityNonceMempoolConfig struct + MaxTx int + OnRead func(tx sdk.Tx) + SignerExtractor SignerExtractionAdapter + TxPriority TxPriority[C] + TxReplacement func(op, np C, oTx, nTx sdk.Tx) bool + func DefaultPriorityNonceMempoolConfig() PriorityNonceMempoolConfig[int64] + type SenderNonceMempool struct + func NewSenderNonceMempool(opts ...SenderNonceOptions) *SenderNonceMempool + func (snm *SenderNonceMempool) CountTx() int + func (snm *SenderNonceMempool) Insert(_ context.Context, tx sdk.Tx) error + func (snm *SenderNonceMempool) NextSenderTx(sender string) sdk.Tx + func (snm *SenderNonceMempool) Remove(tx sdk.Tx) error + func (snm *SenderNonceMempool) Select(_ context.Context, _ [][]byte) Iterator + type SenderNonceOptions func(*SenderNonceMempool) + func SenderNonceMaxTxOpt(maxTx int) SenderNonceOptions + func SenderNonceSeedOpt(seed int64) SenderNonceOptions + type SignerData struct + Sequence uint64 + Signer sdk.AccAddress + func NewSignerData(signer sdk.AccAddress, sequence uint64) SignerData + func (s SignerData) String() string + type SignerExtractionAdapter interface + GetSigners func(sdk.Tx) ([]SignerData, error) + type TxPriority struct + Compare func(a, b C) int + GetTxPriority func(ctx context.Context, tx sdk.Tx) C + MinValue C + func NewDefaultTxPriority() TxPriority[int64]