func WithPreCheck(f PreCheckFunc) CListMempoolOption {
	return func(mem *CListMempool) { mem.preCheck = f }
}
WithPreCheck sets a filter for the mempool to reject a tx if f(tx) returns
false. This is ran before CheckTx. Only applies to the first created block.
After that, Update overwrites the existing value.
package mempool
import (
	"bytes"
	"container/list"
	"crypto/sha256"
	"fmt"
	"sync"
	"sync/atomic"
	abci "github.com/tendermint/tendermint/abci/types"
	cfg "github.com/tendermint/tendermint/config"
	auto "github.com/tendermint/tendermint/libs/autofile"
	"github.com/tendermint/tendermint/libs/clist"
	"github.com/tendermint/tendermint/libs/log"
	tmmath "github.com/tendermint/tendermint/libs/math"
	tmos "github.com/tendermint/tendermint/libs/os"
	tmsync "github.com/tendermint/tendermint/libs/sync"
	"github.com/tendermint/tendermint/p2p"
	"github.com/tendermint/tendermint/proxy"
	"github.com/tendermint/tendermint/types"
)
const TxKeySize = sha256.Size
var newline = []byte("\n")
type CListMempool struct {
	height   int64  
	txsBytes int64  
	notifiedTxsAvailable bool
	txsAvailable         chan struct{}  
	config *cfg.MempoolConfig
	updateMtx tmsync.RWMutex
	preCheck  PreCheckFunc
	postCheck PostCheckFunc
	wal          *auto.AutoFile  
	txs          *clist.CList    
	proxyAppConn proxy.AppConnMempool
	recheckCursor *clist.CElement  
	recheckEnd    *clist.CElement  
	txsMap sync.Map
	cache txCache
	logger log.Logger
	metrics *Metrics
}
var _ Mempool = &CListMempool{}
type CListMempoolOption func(*CListMempool)
func NewCListMempool(
	config *cfg.MempoolConfig,
	proxyAppConn proxy.AppConnMempool,
	height int64,
	options ...CListMempoolOption,
) *CListMempool {
	mempool := &CListMempool{
		config:        config,
		proxyAppConn:  proxyAppConn,
		txs:           clist.New(),
		height:        height,
		recheckCursor: nil,
		recheckEnd:    nil,
		logger:        log.NewNopLogger(),
		metrics:       NopMetrics(),
	}
	if config.CacheSize > 0 {
		mempool.cache = newMapTxCache(config.CacheSize)
	} else {
		mempool.cache = nopTxCache{}
	}
	proxyAppConn.SetResponseCallback(mempool.globalCb)
	for _, option := range options {
		option(mempool)
	}
	return mempool
}
func (mem *CListMempool) EnableTxsAvailable() {
	mem.txsAvailable = make(chan struct{}, 1)
}
func (mem *CListMempool) SetLogger(l log.Logger) {
	mem.logger = l
}