decred / dcrd

Decred daemon in Go (golang).
https://decred.org
ISC License
731 stars 289 forks source link

addrmgr: Track network types and remove TorV2 support #3406

Closed matthawkins90 closed 2 weeks ago

matthawkins90 commented 3 weeks ago

This heavily references the work started in #2627. However, the work will be broken out into smaller chunks. Ultimately, the goal in the near future is to refactor Addrmgr to remove TorV2 support, and add support for TorV3. However, this PR doesn't include any TorV3 work yet.

The first commit enables tracking of address types, and includes several function refactors to improve readability. The new types are defined in network.go, and then constructed in netaddress.go. The rest of the changes propagate outward from there.

The second commit removes TorV2 support.

The third commit adds new functions: ParseHost and NewNetAddressFromParams. These functions will eventually enable two desirable features: