dcrwallet
dcrwallet copied to clipboard
[ticketbuyer] check vsp ticket fees are paid and pay if unpaid
with the new vspd infrastructure that is replacing dcrstakepool, each ticket has a fee that must be paid. while we endeavor to avoid the scenario where a ticket is registered successfully with a vspd, but it's fee is either unpaid or double spent, it is possible for this to occur.
as such, we must handle this scenario. each ticket registered with a vspd should have its status checked to confirm its fee was successfully paid. in the event a vsp fee is not paid and the tx was double spent, wallet should automatically issue a new fee tx when ticketbuyer is running. if tickets are being purchased on-demand, there needs to be a rpc and grpc that allows users to pay these fees easily, likely in bulk.
vspd has /ticketstatus
to facilitate this - https://github.com/decred/vspd/blob/master/docs/api.md#ticket-status
feetxstatus
with a value of error
indicates that a new fee tx needs to be submitted by calling /payfee
again.
As it currently is implemented, the second /payfee
call will need to include the full request again - voting private key and voting choices included. This requirement can be removed if necessary.