selectorvalidator

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: Apache-2.0, MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidLimit means this type of recursive selector limit is not supported by default
	// -- to prevent DDOS attacks
	ErrInvalidLimit = errors.New("unsupported recursive selector limit")
)

Functions

func SelectorValidator

func SelectorValidator(maxAcceptedDepth int64) graphsync.OnIncomingRequestHook

SelectorValidator returns an OnRequestReceivedHook that only validates requests if their selector only has no recursions that are greater than maxAcceptedDepth

func ValidateMaxRecursionDepth

func ValidateMaxRecursionDepth(node ipld.Node, maxAcceptedDepth int64) error

ValidateMaxRecursionDepth examines the given selector node and verifies recursive selectors are limited to the given fixed depth

Types

This section is empty.

Jump to

Keyboard shortcuts

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