func NewReactor(
	logger log.Logger,
	evidenceCh *p2p.Channel,
	peerUpdates *p2p.PeerUpdates,
	evpool *Pool,
) *Reactor {
	r := &Reactor{
		evpool:       evpool,
		evidenceCh:   evidenceCh,
		peerUpdates:  peerUpdates,
		closeCh:      make(chan struct{}),
		peerRoutines: make(map[types.NodeID]*tmsync.Closer),
	}
	r.BaseService = *service.NewBaseService(logger, "Evidence", r)
	return r
}
NewReactor returns a reference to a new evidence reactor, which implements the
service.Service interface. It accepts a p2p Channel dedicated for handling
envelopes with EvidenceList messages.
package evidence
import (
	"fmt"
	"runtime/debug"
	"sync"
	"time"
	clist "github.com/tendermint/tendermint/internal/libs/clist"
	tmsync "github.com/tendermint/tendermint/internal/libs/sync"
	"github.com/tendermint/tendermint/internal/p2p"
	"github.com/tendermint/tendermint/libs/log"
	"github.com/tendermint/tendermint/libs/service"
	tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
	"github.com/tendermint/tendermint/types"
)
var _ service.Service = (*Reactor)(nil)
const (
	EvidenceChannel = p2p.ChannelID(0x38)
	maxMsgSize = 1048576  
	broadcastEvidenceIntervalS = 10
)
func GetChannelDescriptor() *p2p.ChannelDescriptor {
	return &p2p.ChannelDescriptor{
		ID:                  EvidenceChannel,
		MessageType:         new(tmproto.EvidenceList),
		Priority:            6,
		RecvMessageCapacity: maxMsgSize,
		RecvBufferCapacity:  32,
	}
}
type Reactor struct {
	service.BaseService
	evpool      *Pool
	evidenceCh  *p2p.Channel
	peerUpdates *p2p.PeerUpdates
	closeCh     chan struct{}
	peerWG sync.WaitGroup
	mtx          tmsync.Mutex
	peerRoutines map[types.NodeID]*tmsync.Closer
}