Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connmgr: Introduce v2 module. #1833

Merged
merged 4 commits into from
Aug 12, 2019
Merged

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Aug 12, 2019

This requires PR #1831.

In order to make use of chaincfg/v2, a new major version of the connmgr module is required because connmgr/v1 accepts and returns types from chaincfg/v1 in its API.

Since a new major version is required, this also takes the opportunity to remove the tight coupling to chaincfg, by removing the sole reference to *chaincfg.Params in its API.

Consequently, this introduces connmgr/v2. A series of individual commits is provided to make the review process easier. Each commit message more thoroughly describes its purpose, but primarily they consist of the following:

  • Freeze version 1 of the connmgr module use
  • Remove the root module connmgr override so building the software will still produce binaries based on the v1 module until the v2 module is fully released
  • Remove the dependency on chaincfg.
  • Bump the module version to v2
  • Update docs for the new module version

Finally, it should also be noted that this only introduces the new module and does not update anything to make use of it yet, so building the software will still produce binaries based on the v1 module.

@davecgh davecgh added this to the 1.5.0 milestone Aug 12, 2019
Copy link
Member

@dnldd dnldd left a comment

Choose a reason for hiding this comment

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

Looks good.

This freezes the root module usage of the connmgr module by removing the
replacement and bumping the required version.  This means building the
software will still produce binaries based on the v1 module until the v2
module is fully released.

All future releases will be moving to version 2 of the module.

Consequently, it bumps the required module versions as follows:

- github.com/decred/dcrd/connmgr@v1.1.0
This modifies the SeedFromDNS function to accept a string of the DNS
seeds as well as the default port instead of a concrete chaincfg.Params
to remove the tight coupling between the two packages at the API
boundary and allow callers to easily provide custom values if desired.
@davecgh davecgh merged commit 9f926ba into decred:master Aug 12, 2019
@davecgh davecgh deleted the connmgr_introduce_v2 branch August 12, 2019 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants