Skip to content

Conversation

@jrick
Copy link
Member

@jrick jrick commented Dec 15, 2025

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.

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.
@jrick jrick force-pushed the jsonrpc_votingaccount branch from f3d0984 to bf6ac91 Compare December 15, 2025 15:57
Copy link
Member

@jholdstock jholdstock left a comment

Choose a reason for hiding this comment

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

Layering violation is obviously not ideal but it is a drop in the ocean.

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.

purchaseticket JSON-RPC request can not set the voting account without mixing, and will always use the purchase account

2 participants