func (txs *TxStore) SetTx(wtx *WrappedTx) {
	txs.mtx.Lock()
	defer txs.mtx.Unlock()
	if len(wtx.sender) > 0 {
		txs.senderTxs[wtx.sender] = wtx
	}
	txs.hashTxs[wtx.tx.Key()] = wtx
}
SetTx stores a *WrappedTx by it's hash. If the transaction also contains a
non-empty sender, we additionally store the transaction by the sender as
defined by the ABCI application.
package v1
import (
	"sort"
	"time"
	"github.com/tendermint/tendermint/internal/libs/clist"
	tmsync "github.com/tendermint/tendermint/internal/libs/sync"
	"github.com/tendermint/tendermint/types"
)
type WrappedTx struct {
	tx types.Tx
	hash types.TxKey
	height int64
	gasWanted int64
	priority int64
	sender string
	timestamp time.Time
	peers map[uint16]struct{}
	heapIndex int
	gossipEl *clist.CElement
	removed bool
}
func (wtx *WrappedTx) Size() int {
	return len(wtx.tx)
}
type TxStore struct {
	mtx       tmsync.RWMutex
	hashTxs   map[types.TxKey]*WrappedTx  
	senderTxs map[string]*WrappedTx       
}
func NewTxStore() *TxStore {
	return &TxStore{
		senderTxs: make(map[string]*WrappedTx),
		hashTxs:   make(map[types.TxKey]*WrappedTx),
	}
}
func (txs *TxStore) Size() int {
	txs.mtx.RLock()
	defer txs.mtx.RUnlock()
	return len(txs.hashTxs)
}
func (txs *TxStore) GetAllTxs() []*WrappedTx {
	txs.mtx.RLock()
	defer txs.mtx.RUnlock()
	wTxs := make([]*WrappedTx, len(txs.hashTxs))
	i := 0
	for _, wtx := range txs.hashTxs {
		wTxs[i] = wtx
		i++
	}
	return wTxs
}
func (txs *TxStore) GetTxBySender(sender string) *WrappedTx {
	txs.mtx.RLock()
	defer txs.mtx.RUnlock()
	return txs.senderTxs[sender]
}
func (txs *TxStore) GetTxByHash(hash types.TxKey) *WrappedTx {
	txs.mtx.RLock()
	defer txs.mtx.RUnlock()
	return txs.hashTxs[hash]
}
func (txs *TxStore) IsTxRemoved(hash types.TxKey) bool {
	txs.mtx.RLock()
	defer txs.mtx.RUnlock()
	wtx, ok := txs.hashTxs[hash]
	if ok {
		return wtx.removed
	}
	return false
}