GraphsyncConfig class
Configuration for the Graphsync protocol handler.
Defines the default budgets for selector traversal and whether the handler should fall back to Bitswap for missing blocks.
Constructors
- GraphsyncConfig({bool enabled = true, int defaultMaxDepth = 32, int defaultMaxBlocks = 1024, int defaultMaxBytes = _defaultMaxBytes, 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
- 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