GraphsyncConfig class

Configuration for the Graphsync protocol handler.

Defines the default budgets for selector traversal, the hard server-side maxima applied to requester-supplied budgets, and whether the handler should fall back to Bitswap for missing blocks.

Constructors

GraphsyncConfig({@Deprecated('Graphsync availability is controlled by IPFSConfig.enableGraphsync; ' 'this flag is only echoed in handler status and is ignored.') bool enabled = true, int defaultMaxDepth = 32, int defaultMaxBlocks = 1024, int defaultMaxBytes = _defaultMaxBytes, int maxServeDepth = 32, int maxServeBlocks = 10000, int maxServeBytes = _defaultMaxServeBytes, bool fallBackToBitswap = true})
Creates a GraphsyncConfig with the given settings.
const
GraphsyncConfig.fromJson(Map<String, dynamic> json)
Creates a GraphsyncConfig from a JSON map.
factory

Properties

defaultMaxBlocks → int
Default maximum number of blocks returned for a single request.
final
defaultMaxBytes → int
Default maximum number of bytes returned for a single request.
final
defaultMaxDepth → int
Default maximum traversal depth for a Graphsync request.
final
enabled → bool
Whether Graphsync is enabled on this node.
final
fallBackToBitswap → bool
Whether to fall back to Bitswap when a requested block is not local.
final
hashCode → int
The hash code for this object.
no setterinherited
maxServeBlocks → int
Hard upper bound on the number of blocks served to a remote requester.
final
maxServeBytes → int
Hard upper bound on the number of bytes served to a remote requester.
final
maxServeDepth → int
Hard upper bound on traversal depth served to a remote requester.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converts this configuration to a JSON map.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited