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

Move VSP client code to wallet package #2428

Merged
merged 1 commit into from
Sep 19, 2024
Merged

Conversation

jholdstock
Copy link
Member

Moving this code should have minimal impact on consumers of the vsp package because they will have been importing the wallet package already due to the fact that a VSP client could not be created without an instance of wallet.

The benefits of this are:

  • vsp client creation now exists only in the wallet package, rather than being scattered across 3 packages.
  • vsp client loading funcs and variables are no longer package global.
  • simplifies the creation of a vsp client because the wallet no longer needs to be passed into the func as a param.
  • no longer necessary to abstract the vsp client away by referring to its methods, the client can just be used directly.

Can be squashed before merging.

@jholdstock
Copy link
Member Author

Here is a proof of concept on dcrdex to demonstrate that the package reshuffle has minimal impact on existing users. The only notable changes are in spv.go

@jrick
Copy link
Member

jrick commented Sep 18, 2024

No objections, with the tor change I can see the benefit of moving this to the wallet package.

@jrick
Copy link
Member

jrick commented Sep 18, 2024

(please squash manually so the commit message is clean)

This moves the VSP client code from its own package into the wallet package.
Moving this code should have minimal impact on consumers of the vsp package
because they will have been importing the wallet package already due to the fact
that a VSP client could not be created without an instance of wallet.

The benefits of this are:

- vsp client creation now exists only in the wallet package, rather than being
  scattered across 3 packages.
- vsp client loading funcs and variables are no longer package global.
- simplifies the creation of a vsp client because the wallet no longer needs to
  be passed into the func as a param.
- no longer necessary to abstract the vsp client away by referring to its
  methods, the client can just be used directly.
@jrick jrick merged commit d7f30a9 into decred:master Sep 19, 2024
2 checks passed
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.

2 participants