Use --ticketbuyer.votingaccount for purchaseticket RPC#2599
Open
jrick wants to merge 1 commit intodecred:masterfrom
Open
Use --ticketbuyer.votingaccount for purchaseticket RPC#2599jrick wants to merge 1 commit intodecred:masterfrom
jrick wants to merge 1 commit intodecred:masterfrom
Conversation
When purchaseticket lost the ability to specify the voting address, it was not updated in any way to specify the voting account of non-mixed purchases. Take a page from how the mixing options in the dcrwallet application config are passed to the JSON-RPC server and do the same to allow --ticketbuyer.votingaccount to configure purchaseticket. While there's a layering violation obvious here (--ticketbuyer.xyz is only supposed to apply to the auto ticketbuyer), this is better than not having any voting account configuration. The other option of appending a new config parameter to purchaseticket is not feasible due to the positional parameters, and any further API changes to this method should change it to pass a JSON object for config options. When mixing is enabled, and the voting account has been set, require the voting account to match the mixed account to avoid surprises.
f3d0984 to
bf6ac91
Compare
jholdstock
approved these changes
Dec 16, 2025
Member
jholdstock
left a comment
There was a problem hiding this comment.
Layering violation is obviously not ideal but it is a drop in the ocean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When purchaseticket lost the ability to specify the voting address, it was not updated in any way to specify the voting account.
Take a page from how the mixing options in the dcrwallet application config are passed to the JSON-RPC server and do the same to allow --ticketbuyer.votingaccount to configure purchaseticket. While there's a layering violation obvious here (--ticketbuyer.xyz is only supposed to apply to the auto ticketbuyer), this is better than not having any voting account configuration. The other option of appending a new config parameter to purchaseticket is not feasible due to the positional parameters, and any further API changes to this method should change it to pass a JSON object for config options.
When mixing is enabled, and the voting account has been set, require the voting account to match the mixed account to avoid surprises.
Fixes #2598.