github.com/vipernet-xyz/tm@v0.34.24/mempool/mock/mempool.go (about)

     1  package mock
     2  
     3  import (
     4  	abci "github.com/vipernet-xyz/tm/abci/types"
     5  	"github.com/vipernet-xyz/tm/libs/clist"
     6  	"github.com/vipernet-xyz/tm/mempool"
     7  	"github.com/vipernet-xyz/tm/types"
     8  )
     9  
    10  // Mempool is an empty implementation of a Mempool, useful for testing.
    11  type Mempool struct{}
    12  
    13  var _ mempool.Mempool = Mempool{}
    14  
    15  func (Mempool) Lock()     {}
    16  func (Mempool) Unlock()   {}
    17  func (Mempool) Size() int { return 0 }
    18  func (Mempool) CheckTx(_ types.Tx, _ func(*abci.Response), _ mempool.TxInfo) error {
    19  	return nil
    20  }
    21  func (Mempool) RemoveTxByKey(txKey types.TxKey) error   { return nil }
    22  func (Mempool) ReapMaxBytesMaxGas(_, _ int64) types.Txs { return types.Txs{} }
    23  func (Mempool) ReapMaxTxs(n int) types.Txs              { return types.Txs{} }
    24  func (Mempool) Update(
    25  	_ int64,
    26  	_ types.Txs,
    27  	_ []*abci.ResponseDeliverTx,
    28  	_ mempool.PreCheckFunc,
    29  	_ mempool.PostCheckFunc,
    30  ) error {
    31  	return nil
    32  }
    33  func (Mempool) Flush()                        {}
    34  func (Mempool) FlushAppConn() error           { return nil }
    35  func (Mempool) TxsAvailable() <-chan struct{} { return make(chan struct{}) }
    36  func (Mempool) EnableTxsAvailable()           {}
    37  func (Mempool) SizeBytes() int64              { return 0 }
    38  
    39  func (Mempool) TxsFront() *clist.CElement    { return nil }
    40  func (Mempool) TxsWaitChan() <-chan struct{} { return nil }
    41  
    42  func (Mempool) InitWAL() error { return nil }
    43  func (Mempool) CloseWAL()      {}