github.com/evdatsion/aphelion-dpos-bft@v0.32.1/mock/mempool.go (about)

     1  package mock
     2  
     3  import (
     4  	abci "github.com/evdatsion/aphelion-dpos-bft/abci/types"
     5  	"github.com/evdatsion/aphelion-dpos-bft/libs/clist"
     6  	mempl "github.com/evdatsion/aphelion-dpos-bft/mempool"
     7  	"github.com/evdatsion/aphelion-dpos-bft/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)) error {
    19  	return nil
    20  }
    21  func (Mempool) CheckTxWithInfo(_ types.Tx, _ func(*abci.Response),
    22  	_ mempl.TxInfo) error {
    23  	return nil
    24  }
    25  func (Mempool) ReapMaxBytesMaxGas(_, _ int64) types.Txs { return types.Txs{} }
    26  func (Mempool) ReapMaxTxs(n int) types.Txs              { return types.Txs{} }
    27  func (Mempool) Update(
    28  	_ int64,
    29  	_ types.Txs,
    30  	_ []*abci.ResponseDeliverTx,
    31  	_ mempl.PreCheckFunc,
    32  	_ mempl.PostCheckFunc,
    33  ) error {
    34  	return nil
    35  }
    36  func (Mempool) Flush()                        {}
    37  func (Mempool) FlushAppConn() error           { return nil }
    38  func (Mempool) TxsAvailable() <-chan struct{} { return make(chan struct{}) }
    39  func (Mempool) EnableTxsAvailable()           {}
    40  func (Mempool) TxsBytes() int64               { return 0 }
    41  
    42  func (Mempool) TxsFront() *clist.CElement    { return nil }
    43  func (Mempool) TxsWaitChan() <-chan struct{} { return nil }
    44  
    45  func (Mempool) InitWAL()  {}
    46  func (Mempool) CloseWAL() {}