validator

package
v0.29.0-stable-cadence-3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2022 License: AGPL-3.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TopicValidator

func TopicValidator(log zerolog.Logger, c network.Codec, slashingViolationsConsumer slashing.ViolationsConsumer, peerFilter func(peer.ID) error, validators ...validator.PubSubMessageValidator) pubsub.ValidatorEx

TopicValidator is the topic validator that is registered with libP2P whenever a flow libP2P node subscribes to a topic. The TopicValidator will decode and perform validation on the raw pubsub message.

Types

type TopicValidatorData added in v0.27.3

type TopicValidatorData struct {
	Message           *message.Message
	DecodedMsgPayload interface{}
	From              peer.ID
}

TopicValidatorData includes information about the message being sent.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL