Skip to content

A -seednode might get disconnected before receiving a full addr response #19694

@sdaftuar

Description

@sdaftuar

While testing #19316, I noticed some odd behavior around -seednode.

As far as I understand, users can use the -seednode argument in order to get a set of addresses from a peer to seed their addrman.

However, using another Bitcoin Core node as a -seednode seems to not work very well, because one of the first things we do with a new peer connection is send a single addr message to our peer, which in turn causes the peer to think we've satisfied their getaddr request -- when all we've done is give them our own address, rather than a list of 1000 addresses to seed their addrman with.

I'm not quite sure how to make this better in a robust way (there's an ambiguity in our protocol as to whether an addr message is a response to a getaddr, or an unrequested announcement); perhaps this is a moot point if either (a) no one really uses this argument anyway, or (b) people who do use this are connecting to different software that doesn't advertise itself the way Bitcoin Core does.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions