blockfilter

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2023 License: Apache-2.0, BSD-2-Clause Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorCommitmentNotCommittable      = errors.New("a block cannot commit to a slot that cannot objectively be committable yet")
	ErrorsBlockTimeTooFarAheadInFuture = errors.New("a block cannot be too far ahead in the future")
	ErrorsInvalidSignature             = errors.New("block has invalid signature")
	ErrorsSignatureValidationFailed    = errors.New("error validating block signature")
)

Functions

func NewProvider

func NewProvider(opts ...options.Option[Filter]) module.Provider[*engine.Engine, filter.Filter]

func WithMaxAllowedWallClockDrift

func WithMaxAllowedWallClockDrift(d time.Duration) options.Option[Filter]

WithMaxAllowedWallClockDrift specifies how far in the future are blocks allowed to be ahead of our own wall clock (defaults to 0 seconds).

func WithMinCommittableSlotAge

func WithMinCommittableSlotAge(age slot.Index) options.Option[Filter]

WithMinCommittableSlotAge specifies how old a slot has to be for it to be committable.

func WithSignatureValidation

func WithSignatureValidation(validation bool) options.Option[Filter]

WithSignatureValidation specifies if the block signature should be validated (defaults to yes).

Types

type Filter

type Filter struct {
	module.Module
	// contains filtered or unexported fields
}

Filter filters blocks.

func New

func New(opts ...options.Option[Filter]) *Filter

New creates a new Filter.

func (*Filter) Events

func (f *Filter) Events() *filter.Events

func (*Filter) ProcessReceivedBlock

func (f *Filter) ProcessReceivedBlock(block *models.Block, source identity.ID)

ProcessReceivedBlock processes block from the given source.

Jump to

Keyboard shortcuts

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