GraphsyncConfig.fromJson constructor
Creates a GraphsyncConfig from a JSON map.
Implementation
factory GraphsyncConfig.fromJson(Map<String, dynamic> json) {
return GraphsyncConfig(
enabled: json['enabled'] as bool? ?? true,
defaultMaxDepth: json['defaultMaxDepth'] as int? ?? 32,
defaultMaxBlocks: json['defaultMaxBlocks'] as int? ?? 1024,
defaultMaxBytes: json['defaultMaxBytes'] as int? ?? _defaultMaxBytes,
fallBackToBitswap: json['fallBackToBitswap'] as bool? ?? true,
);
}