func (mem *Mempool) EnableTxsAvailable() {
	mem.txsAvailable = make(chan struct{}, 1)
}
EnableTxsAvailable initializes the TxsAvailable channel,
ensuring it will trigger once every height when transactions are available.
NOTE: not thread safe - should only be called once, on startup
package mempool
import (
	"bytes"
	"container/list"
	"fmt"
	"sync"
	"sync/atomic"
	"time"
	"github.com/pkg/errors"
	abci "github.com/tendermint/tendermint/abci/types"
	auto "github.com/tendermint/tendermint/libs/autofile"
	"github.com/tendermint/tendermint/libs/clist"
	cmn "github.com/tendermint/tendermint/libs/common"
	"github.com/tendermint/tendermint/libs/log"
	cfg "github.com/tendermint/tendermint/config"
	"github.com/tendermint/tendermint/proxy"
	"github.com/tendermint/tendermint/types"
)
var (
	ErrTxInCache = errors.New("Tx already exists in cache")
	ErrMempoolIsFull = errors.New("Mempool is full")
)
func TxID(tx []byte) string {
	return fmt.Sprintf("%X", types.Tx(tx).Hash())
}
type Mempool struct {
	config *cfg.MempoolConfig
	proxyMtx             sync.Mutex
	proxyAppConn         proxy.AppConnMempool
	txs                  *clist.CList     
	counter              int64            
	height               int64            
	rechecking           int32            
	recheckCursor        *clist.CElement  
	recheckEnd           *clist.CElement  
	notifiedTxsAvailable bool
	txsAvailable         chan struct{}  
	cache txCache
	wal *auto.AutoFile
	logger log.Logger
	metrics *Metrics
}
type MempoolOption func(*Mempool)
func NewMempool(
	config *cfg.MempoolConfig,
	proxyAppConn proxy.AppConnMempool,
	height int64,
	options ...MempoolOption,
) *Mempool {
	mempool := &Mempool{
		config:        config,
		proxyAppConn:  proxyAppConn,
		txs:           clist.New(),
		counter:       0,
		height:        height,
		rechecking:    0,
		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.resCb)
	for _, option := range options {
		option(mempool)
	}
	return mempool
}