dcrwallet icon indicating copy to clipboard operation
dcrwallet copied to clipboard

ticketbuyer.votingaccount not being used with purchaseticket

Open raedah opened this issue 5 years ago • 1 comments

The configured voting account is used when doing coinjoins, but is not used when doing a standard purchaseticket. Expected behavior is for the configured votingaccount to apply to all ticket purchases.

raedah avatar Jan 10 '20 01:01 raedah

The purchaseticket method needs to be replaced with something more flexible. Here is the problem:

$ dcrctl -l | grep purchaseticket
purchaseticket "fromaccount" spendlimit (minconf=1 "ticketaddress" numtickets "pooladdress" poolfees expiry "comment" ticketfee)

There's no place to specify a voting account without also specifying a voting address (which is nonsensical, but could be the empty string), VSP options (which don't support anything but a static voting address, therefore also nonsensical), and an unused comment field.

We can't use the application defaults, because by precedence, this RPC does not use those application options anyways, instead requiring the caller to pass them in each time.

jrick avatar Jan 10 '20 01:01 jrick