Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Upgrade dcrwallet to master branch (future version v4) #48
Upgrade dcrwallet to master branch (future version v4) #48
Changes from all commits
b87f8d5
5e1eee9
5f2fb01
860029e
b980746
c92100a
000de69
ccb3b21
e812b40
60d8e04
e431d1d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might it be necessary to continue even if it's the same value? Below, the specified ticket or all unvoted tickets are updated with the vsp to use this choice. I'm wondering if it's possible that a ticket in that list doesn't already have the correct vote choice set with the vsp.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The purpose of this is to prevent unnecessary API calls. It does this by preventing the existing choice being set again.
I don't think setting the same choice again is necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of the new dcrwallet commits since
v3.0.1
abolished the concept offirstErr
and returns any error encountered immediately. We should adopt that. Can possibly create a separate issue but generally, when upgrading the dcrwallet dep, I often do a comparison of the code changes between the last version in our go.mod and the new version we're introducing. The comparison for this version bump is https://github.com/decred/dcrwallet/compare/v3.0.1..a87fa843495e (file changes) and decred/dcrwallet@v3.0.1...a87fa84 (commits).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be done app wide so a separate issue can best address this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This look correct?
votingPreference = choices[d.Vote.Id]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is double query; during the map for loop,
choices[d.Vote.Id]
already exists aschoiceID
.