Page MenuHomePhabricator

net: split resolve out of connect
ClosedPublic

Authored by deadalnix on Oct 3 2018, 14:17.

Details

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.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
splitnetresolveconnect
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 3493
Build 5062: Bitcoin ABC Buildbot (legacy)
Build 5061: arc lint + arc unit

Event Timeline

Add a new line after some log.

This revision is now accepted and ready to land.Oct 3 2018, 19:48
This revision was automatically updated to reflect the committed changes.