func WithValidator(validator GossipValidator) GossiperOption {
	return func(g *Gossiper) error {
		return g.ps.RegisterTopicValidator(g.topic.String(), wrapValidator(validator))
	}
}
WithValidator options registers topic validator for Gossiper.
package p2p
import (
	"context"
	"go.uber.org/multierr"
	"github.com/libp2p/go-libp2p-core/host"
	"github.com/libp2p/go-libp2p-core/peer"
	pubsub "github.com/libp2p/go-libp2p-pubsub"
	"github.com/celestiaorg/optimint/log"
)
type GossipMessage struct {
	Data []byte
	From peer.ID
}
type GossipHandler func(*GossipMessage)
type GossipValidator func(*GossipMessage) bool
type GossiperOption func(*Gossiper) error
func WithHandler(handler GossipHandler) GossiperOption {
	return func(g *Gossiper) error {
		g.handler = handler
		return nil
	}
}