github.com/PikeEcosystem/tendermint@v0.0.4/mempool/mock/mempool.go (about) 1 package mock 2 3 import ( 4 abci "github.com/tendermint/tendermint/abci/types" 5 6 tmabci "github.com/PikeEcosystem/tendermint/abci/types" 7 "github.com/PikeEcosystem/tendermint/libs/clist" 8 mempl "github.com/PikeEcosystem/tendermint/mempool" 9 "github.com/PikeEcosystem/tendermint/types" 10 ) 11 12 // Mempool is an empty implementation of a Mempool, useful for testing. 13 type Mempool struct{} 14 15 var _ mempl.Mempool = Mempool{} 16 17 func (Mempool) Lock() {} 18 func (Mempool) Unlock() {} 19 func (Mempool) Size() int { return 0 } 20 func (Mempool) CheckTxSync(_ types.Tx, _ mempl.TxInfo) (*tmabci.Response, error) { 21 return nil, nil 22 } 23 func (Mempool) CheckTxAsync(_ types.Tx, _ mempl.TxInfo, _ func(error), _ func(*tmabci.Response)) { 24 } 25 func (Mempool) ReapMaxBytesMaxGas(_, _ int64) types.Txs { return types.Txs{} } 26 func (Mempool) ReapMaxBytesMaxGasMaxTxs(_, _, _ int64) types.Txs { return types.Txs{} } 27 func (Mempool) ReapMaxTxs(n int) types.Txs { return types.Txs{} } 28 func (Mempool) Update( 29 _ *types.Block, 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() error { return nil } 46 func (Mempool) CloseWAL() {}