dcrwallet icon indicating copy to clipboard operation
dcrwallet copied to clipboard

Use --ticketbuyer.votingaccount for purchaseticket RPC

Open jrick opened this issue 2 weeks ago • 0 comments

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.

jrick avatar Dec 15 '25 15:12 jrick