DHTConfig constructor
- @Deprecated('The Kademlia protocol ID is hardcoded in the DHT client; ' 'this option is ignored.') String protocolId = '/ipfs/kad/1.0.0',
- int alpha = 3,
- int bucketSize = 20,
- @Deprecated('Provider record counts are not limited by config; ' 'this option is ignored.') int maxProvidersPerKey = 20,
- Duration requestTimeout = const Duration(seconds: 30),
- @Deprecated('Query result counts are not limited by config; ' 'this option is ignored.') int maxRecordsPerQuery = 20,
- @Deprecated('Provider records are always stored; this option is ignored.') bool enableProviderRecording = true,
- @Deprecated('Value storage is always enabled; this option is ignored.') bool enableValueStorage = true,
- bool validateProviderRecords = true,
- bool reproviderEnabled = true,
- Duration reproviderInterval = const Duration(hours: 12),
- String reproviderStrategy = 'pinned',
- int reproviderBatchSize = 100,
- int reproviderConcurrency = 10,
- bool reproviderSweepOptimization = true,
Creates a new DHTConfig with default Kademlia settings.
Implementation
const DHTConfig({
@Deprecated(
'The Kademlia protocol ID is hardcoded in the DHT client; '
'this option is ignored.',
)
this.protocolId = '/ipfs/kad/1.0.0',
this.alpha = 3,
this.bucketSize = 20,
@Deprecated(
'Provider record counts are not limited by config; '
'this option is ignored.',
)
this.maxProvidersPerKey = 20,
this.requestTimeout = const Duration(seconds: 30),
@Deprecated(
'Query result counts are not limited by config; '
'this option is ignored.',
)
this.maxRecordsPerQuery = 20,
@Deprecated('Provider records are always stored; this option is ignored.')
this.enableProviderRecording = true,
@Deprecated('Value storage is always enabled; this option is ignored.')
this.enableValueStorage = true,
this.validateProviderRecords = true,
this.reproviderEnabled = true,
this.reproviderInterval = const Duration(hours: 12),
this.reproviderStrategy = 'pinned',
this.reproviderBatchSize = 100,
this.reproviderConcurrency = 10,
this.reproviderSweepOptimization = true,
});