blocksub

package
v1.2.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: Apache-2.0, MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Topic

func Topic(networkName string) string

BlockTopic returns the network pubsub topic identifier on which new blocks are announced.

Types

type BlockHeaderValidator added in v0.9.1

type BlockHeaderValidator interface {
	ValidateBlockMsg(context.Context, *types.BlockMsg) pubsub.ValidationResult
}

type BlockTopicValidator

type BlockTopicValidator struct {
	// contains filtered or unexported fields
}

BlockTopicValidator may be registered on go-libp2p-pubsub to validate blocksub messages.

func NewBlockTopicValidator

func NewBlockTopicValidator(bv BlockHeaderValidator, opts ...pubsub.ValidatorOpt) *BlockTopicValidator

NewBlockTopicValidator retruns a BlockTopicValidator using `bv` for message validation

func (*BlockTopicValidator) Opts

func (btv *BlockTopicValidator) Opts() []pubsub.ValidatorOpt

func (*BlockTopicValidator) Topic

func (btv *BlockTopicValidator) Topic(network string) string

func (*BlockTopicValidator) Validator

func (btv *BlockTopicValidator) Validator() pubsub.ValidatorEx

Jump to

Keyboard shortcuts

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