github.com/cosmos/cosmos-sdk@v0.50.10/types/mempool/noop.go (about)

     1  package mempool
     2  
     3  import (
     4  	"context"
     5  
     6  	sdk "github.com/cosmos/cosmos-sdk/types"
     7  )
     8  
     9  var _ ExtMempool = (*NoOpMempool)(nil)
    10  
    11  // NoOpMempool defines a no-op mempool. Transactions are completely discarded and
    12  // ignored when BaseApp interacts with the mempool.
    13  //
    14  // Note: When this mempool is used, it assumed that an application will rely
    15  // on CometBFT's transaction ordering defined in `RequestPrepareProposal`, which
    16  // is FIFO-ordered by default.
    17  type NoOpMempool struct{}
    18  
    19  func (NoOpMempool) Insert(context.Context, sdk.Tx) error                  { return nil }
    20  func (NoOpMempool) Select(context.Context, [][]byte) Iterator             { return nil }
    21  func (NoOpMempool) SelectBy(context.Context, [][]byte, func(sdk.Tx) bool) {}
    22  func (NoOpMempool) CountTx() int                                          { return 0 }
    23  func (NoOpMempool) Remove(sdk.Tx) error                                   { return nil }