Skip to content

addrmgr: Implement stdlib net.Addr.#3692

Open
davecgh wants to merge 2 commits into
decred:masterfrom
davecgh:addrmgr_implement_stdlib_net_addr
Open

addrmgr: Implement stdlib net.Addr.#3692
davecgh wants to merge 2 commits into
decred:masterfrom
davecgh:addrmgr_implement_stdlib_net_addr

Conversation

@davecgh
Copy link
Copy Markdown
Member

@davecgh davecgh commented May 17, 2026

This is rebased on #3690.

This adds the Network method to the addrmgr.NetAddress type so that it can be used as a stdlib net.Addr.

davecgh added 2 commits May 13, 2026 05:27
This moves the logic related to requesting and advertising addresses to
after the handshake completes as opposed to doing it during the
handshake in the version message handler.

In practice, the overall effect is the same, but moving it to happen
after the handshake has at least the following benefits:

- It helps ensure no other messages are queued up or sent between the
  version and verack messages
- It keeps the version handler focused on its primary purpose of
  negotiation and rejection of peers deemed to be unsuitable
- It is easier to reason about the sequence of events
This adds the Network method to the addrmgr.NetAddress type so that it
can be used as a stdlib net.Addr.
@davecgh davecgh added this to the 2.2.0 milestone May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants