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

client: Automatic fee payment from dcrwallet #382

Merged
merged 10 commits into from
May 30, 2023

Conversation

jholdstock
Copy link
Member

Broken into commits to ease reviewing.

Closes #379

@jholdstock jholdstock requested review from jrick and JoeGruffins April 20, 2023 09:50
@jholdstock jholdstock force-pushed the internal-vsp branch 2 times, most recently from 81ca261 to c7e7ff6 Compare April 20, 2023 11:01
Copy link
Member

@JoeGruffins JoeGruffins left a comment

Choose a reason for hiding this comment

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

Have tried this out but replacing v3 wallet with v2 and it's working nicely. Thanks for making these changes. This is a very useful package to have access to!

client/autoclient.go Show resolved Hide resolved
client/autoclient.go Show resolved Hide resolved
client/autoclient.go Outdated Show resolved Hide resolved
@jholdstock
Copy link
Member Author

Cheers Joe, I've made all those changes.

client/feepayment.go Outdated Show resolved Hide resolved
client/feepayment.go Outdated Show resolved Hide resolved
client/feepayment.go Show resolved Hide resolved
client/feepayment.go Outdated Show resolved Hide resolved
@jholdstock
Copy link
Member Author

jholdstock commented Apr 24, 2023

Thanks Buck. I found another mutex issue in TrackedTickets(), fixed it in the same commit.

Rebased onto latest changes in the wallet repo (decred/dcrwallet#2227)

@jrick
Copy link
Member

jrick commented Apr 24, 2023

Replacing crypto/rand with math/rand doesn't sit well with me.

You don't need a PRNG here, so the calls to uniformprng could be replaced with using crypto/rand directly.

For the random jitter duration, I would just copy the body of the uniformprng Int63n method, but read a random uint64 from crypto/rand.

Copy files from dcrwallet without changing them at all, therefore this commit does not compile. It exists just to aid review. Commits following this one will clearly highlight what has been changed.
Includes a couple of tweaks to linter settings, nothing major.
@jholdstock
Copy link
Member Author

Rebased and now using crypto/rand per a conversation with jrick.

@buck54321 @JoeGruffins please test these latest changes against your code and see if this satisfies your requirements.

@JoeGruffins
Copy link
Member

JoeGruffins commented May 1, 2023

Tested at 0ec0813 and seems to be working well.

@buck54321
Copy link
Member

Tested again today. Appears to be working great.

@jholdstock
Copy link
Member Author

I believe all feedback has been addressed and this can be merged.

I pushed one last commit to move this back to dcrwallet/v3 in order to get this working against master dcrd/dcrwallet.

@jholdstock jholdstock marked this pull request as ready for review May 25, 2023 09:48
@jholdstock jholdstock merged commit a5003c0 into decred:master May 30, 2023
jholdstock added a commit to jholdstock/dcrwallet that referenced this pull request Jun 20, 2023
The goal of this PR is to reduce dependencies between the VSP client and other wallet code.

The first 3 commits are bringing the dcrwallet client up-to-date with some changes made in decred/vspd#382.

As a result of this PR, feepayment.go no longer has any dependency on decred.org/dcrwallet, and the interface between dcrwallet and vspd can be reduced by 6 funcs.
@jholdstock jholdstock deleted the internal-vsp branch September 20, 2023 08:23
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.

multi: Add autoclient.
4 participants