selectorvalidator

package
v0.10.9 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2021 License: Apache-2.0, MIT Imports: 8 Imported by: 1

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