Skip to content

Conversation

@Fuzzbawls
Copy link
Collaborator

Port of bitcoin#7868

This brings CNetAddr/CSubNet/CService one step closer to being dumb storage structures. By forcing addresses to be resolved elsewhere, the implementation details are free to change. In particular, this is necessary for making the resolves fully async, which is necessary in a model in which the entire connection process is asynchronous.

To make it clear where DNS resolves are happening
Note: Some seeds aren't actually returning an IP for their name entries, so
they're being added to addrman with a source of [::].

This commit shouldn't change that behavior, for better or worse.
Rather than allowing CNetAddr/CService/CSubNet to launch DNS queries, require
that addresses are already resolved.

This greatly simplifies async resolve logic, and makes it harder to
accidentally leak DNS queries.
@Fuzzbawls Fuzzbawls added this to the 4.1.0 milestone Feb 27, 2020
@Fuzzbawls Fuzzbawls self-assigned this Feb 27, 2020
@Fuzzbawls Fuzzbawls force-pushed the 2020_net-cleanup-resolve branch from 11f0e3e to d8645b8 Compare February 27, 2020 11:51
Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Several edits (changing the convention for pointers/references declaration) seem unnecessary.

CNetAddr/CService/CSubnet can no longer resolve DNS.
@Fuzzbawls Fuzzbawls force-pushed the 2020_net-cleanup-resolve branch from d8645b8 to ccf4902 Compare March 3, 2020 10:05
Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK ccf4902

Copy link

@furszy furszy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good initial back port, utACK ccf4902

@furszy furszy merged commit aee2301 into PIVX-Project:master Mar 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants