HomePhabricator

net: split resolve out of connect

Description

net: split resolve out of connect

Summary:

  • net: separate resolving and conecting

ConnectSocketByName handled resolves as necessary, obscuring the connection
process. With them separated, each can be handled asynchronously.

Also, since proxies must be considered now anyway, go ahead and eliminate the
ConnectSocket wrapper and use ConnectSocketDirectly... directly.

  • net: remove now-unused functions
  • Make sure the seeder also use the new API
  • net: remove now-superfluous numeric resolve

This was added in order to help OpenNetworkConnection avoid creating a
connection that it would end up aborting. It was necessary because resolving
was done as part of the connection process.

Now that resolving is separated from connecting, this case is detected before
the connection is attempted.

This is a backport of core PR10663 , with the addition of code changes in the seeder.

Test Plan:

make check

Run the seeder and checks that it is still behaving properly.

Reviewers: #bitcoin_abc, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Subscribers: teamcity

Differential Revision: https://reviews.bitcoinabc.org/D1870

Details

Provenance
Cory Fields <cory-nospam-@coryfields.com>Authored on Jun 22 2017, 18:01
deadalnixCommitted on Oct 4 2018, 09:25
deadalnixPushed on Oct 4 2018, 09:39
Reviewer
Restricted Project
Differential Revision
D1870: net: split resolve out of connect
Parents
rSTAGINGfe6305d6b499: [qa] fundrawtransaction to use billable_size instead of count_bytes
Branches
Unknown
Tags
Unknown

Event Timeline