selectorvalidator

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2021 License: MIT, 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 int) 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 int) 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