Use --ticketbuyer.votingaccount for purchaseticket RPC #2599
+24
−10
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.