func (memR *MempoolReactor) BroadcastTx(tx agtypes.Tx) error {
	return memR.Mempool.CheckTx(tx)
}
Just an alias for CheckTx since broadcasting happens in peer routines
package mempool
import (
	"fmt"
	"reflect"
	"time"
	"github.com/spf13/viper"
	"go.uber.org/zap"
	mempb "github.com/annchain/annchain/angine/protos/mempool"
	agtypes "github.com/annchain/annchain/angine/types"
	"github.com/annchain/annchain/module/lib/go-clist"
	"github.com/annchain/annchain/module/lib/go-p2p"
	"github.com/annchain/annchain/module/xlib/def"
)
const (
	MempoolChannel = byte(0x30)
	maxMempoolMessageSize      = 1048576  
	peerCatchupSleepIntervalMS = 100      
)
type MempoolReactor struct {
	p2p.BaseReactor
	config  *viper.Viper
	Mempool *Mempool
	evsw    agtypes.EventSwitch
	logger  *zap.Logger
}
func NewMempoolReactor(logger *zap.Logger, config *viper.Viper, mempool *Mempool) *MempoolReactor {
	memR := &MempoolReactor{
		config:  config,
		Mempool: mempool,
		logger:  logger,
	}
	memR.BaseReactor = *p2p.NewBaseReactor(logger, "MempoolReactor", memR)
	return memR
}
func (memR *MempoolReactor) GetChannels() []*p2p.ChannelDescriptor {
	return []*p2p.ChannelDescriptor{
		&p2p.ChannelDescriptor{
			ID:       MempoolChannel,
			Priority: 5,
		},
	}
}
func (memR *MempoolReactor) AddPeer(peer *p2p.Peer) {
	go memR.broadcastTxRoutine(peer)
}
func (memR *MempoolReactor) RemovePeer(peer *p2p.Peer, reason interface{}) {
}
func (memR *MempoolReactor) Receive(chID byte, src *p2p.Peer, msgBytes []byte) {
	msg, err := mempb.UnmarshalMpMsg(msgBytes)
	if err != nil {
		memR.logger.Warn("Error decoding message", zap.String("error", err.Error()))
		return
	}
	switch msg := msg.(type) {
	case *mempb.TxMessage:
		if err := memR.Mempool.CheckTx(agtypes.Tx(msg.Tx)); err != nil {
			memR.logger.Debug("Could not add tx", zap.ByteString("tx", agtypes.Tx(msg.Tx).Hash()), zap.String("error", err.Error()))
			return
		}
	default:
		memR.logger.Warn(fmt.Sprintf("Unknown message type %T", reflect.TypeOf(msg)))
	}
}