bitbucket.org/number571/tendermint@v0.8.14/internal/mempool/mock/mempool.go (about) 1 package mock 2 3 import ( 4 "context" 5 6 abci "bitbucket.org/number571/tendermint/abci/types" 7 "bitbucket.org/number571/tendermint/internal/libs/clist" 8 mempl "bitbucket.org/number571/tendermint/internal/mempool" 9 "bitbucket.org/number571/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) CheckTx(_ context.Context, _ types.Tx, _ func(*abci.Response), _ mempl.TxInfo) error { 21 return nil 22 } 23 func (Mempool) ReapMaxBytesMaxGas(_, _ int64) types.Txs { return types.Txs{} } 24 func (Mempool) ReapMaxTxs(n int) types.Txs { return types.Txs{} } 25 func (Mempool) Update( 26 _ int64, 27 _ types.Txs, 28 _ []*abci.ResponseDeliverTx, 29 _ mempl.PreCheckFunc, 30 _ mempl.PostCheckFunc, 31 ) error { 32 return nil 33 } 34 func (Mempool) Flush() {} 35 func (Mempool) FlushAppConn() error { return nil } 36 func (Mempool) TxsAvailable() <-chan struct{} { return make(chan struct{}) } 37 func (Mempool) EnableTxsAvailable() {} 38 func (Mempool) SizeBytes() int64 { return 0 } 39 40 func (Mempool) TxsFront() *clist.CElement { return nil } 41 func (Mempool) TxsWaitChan() <-chan struct{} { return nil } 42 43 func (Mempool) InitWAL() error { return nil } 44 func (Mempool) CloseWAL() {}