Join GitHub today
net: Split DNS resolving functionality out of net structures #7868
First PR of many in the p2p refactor.
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.
The DNS seed TODO could be fixed more properly with something like this: theuni@792b0f5 (an ipv6 range would probably make more sense, though), but I'll leave that for another PR.
Updated for @sipa's comment.
@instagibbs I didn't manage to get it ready last week as hoped, but a PR that looks similar to https://github.com/theuni/bitcoin/tree/net-refactor12 plus a lengthy explanation is hopefully coming up in the next day or two. That work aims to segregate the p2p functionality from the rest of the code so that it can be replaced in chunks without interfering with other subsystems.
referenced this pull request
Apr 18, 2016
Addressed @sipa's concern above (I hope). For reference, the following mainnet seeds don't currently resolve their names properly (for me, anyway), so they end up grouped together with sources of [::]:
I've confirmed that seed results are added to addrman that way before and after this change. I'll work on fixing that in a follow-up pull-request.