github.com/mydexchain/tendermint@v0.0.4/mempool/mock/mempool.go (about)

     1  package mock
     2  
     3  import (
     4  	abci "github.com/mydexchain/tendermint/abci/types"
     5  	"github.com/mydexchain/tendermint/libs/clist"
     6  	mempl "github.com/mydexchain/tendermint/mempool"
     7  	"github.com/mydexchain/tendermint/types"
     8  )
     9  
    10  // Mempool is an empty implementation of a Mempool, useful for testing.
    11  type Mempool struct{}
    12  
    13  var _ mempl.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), _ mempl.TxInfo) error {
    19  	return nil
    20  }
    21  func (Mempool) ReapMaxBytesMaxGas(_, _ int64) types.Txs { return types.Txs{} }
    22  func (Mempool) ReapMaxTxs(n int) types.Txs              { return types.Txs{} }
    23  func (Mempool) Update(
    24  	_ int64,
    25  	_ types.Txs,
    26  	_ []*abci.ResponseDeliverTx,
    27  	_ mempl.PreCheckFunc,
    28  	_ mempl.PostCheckFunc,
    29  ) error {
    30  	return nil
    31  }
    32  func (Mempool) Flush()                        {}
    33  func (Mempool) FlushAppConn() error           { return nil }
    34  func (Mempool) TxsAvailable() <-chan struct{} { return make(chan struct{}) }
    35  func (Mempool) EnableTxsAvailable()           {}
    36  func (Mempool) TxsBytes() int64               { return 0 }
    37  
    38  func (Mempool) TxsFront() *clist.CElement    { return nil }
    39  func (Mempool) TxsWaitChan() <-chan struct{} { return nil }
    40  
    41  func (Mempool) InitWAL() error { return nil }
    42  func (Mempool) CloseWAL()      {}