Skip to content

Configuration Struct - #23

Merged
btoms20 merged 10 commits into
mainfrom
misc-work
Sep 3, 2026
Merged

Configuration Struct#23
btoms20 merged 10 commits into
mainfrom
misc-work

Conversation

@btoms20

@btoms20 btoms20 commented Sep 3, 2026

Copy link
Copy Markdown
Member

What?

This PR consolidates NodeOptions and DHTConfiguration into a single Configuration struct whose defaults mirror the Defaults list. The Defaults list was also updated with a few more constants in an effort to keep magic numbers in a single location.

Changes:

  • Deleted KadDHT.NodeOptions and KadDHT.DHTConfiguration
  • Introduced KadDHT.Configuration struct who's initializer defaults to every const in our Defaults struct
  • Removed the maxPeers param (this is roughly set by controlling the RoutingTable's Bucket size)

Note

See Sources/LibP2PKadDHT/Defaults.swift for the default DHT parameters.

@btoms20 btoms20 self-assigned this Sep 3, 2026
@btoms20 btoms20 added enhancement New feature or request breaking-change Introduces breaking changes labels Sep 3, 2026
@btoms20
btoms20 merged commit a6cf12b into main Sep 3, 2026
35 of 53 checks passed
@btoms20
btoms20 deleted the misc-work branch September 3, 2026 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change Introduces breaking changes enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant