Previously the voting wallet status and the ticket search were stacked on top of eachother, making the page very long and awkward to navigate. This introduces tabbed navigation which allows just one to be displayed at a time.
**NOTE: This contains a backwards incompatible database migration, so if you plan to test it, please make a copy of your database first.**
Moves tickets from a single database bucket containing JSON encoded strings, to a bucket for each ticket.
This change is to preemptively deal with scaling issues seen with databases containing tens of thousands of tickets.
This PR introduces a database migration which deletes any raw fee transactions which remain in the database after already having been confirmed on-chain. There is no need to keep these, and they take up a lot of space.
There is also a change in the background handler to ensure that in future, tx hex is always removed from the database when the tx is confirmed.
* Ensure purchase height set for confirmed tickets.
* Show purchase height in admin screen.
Only show purchase height when the ticket is confirmed, because if a ticket is not confirmed, its purchase height is not yet known.
Plus a few other miscellaneous pieces which will be usedful soon:
- Remove `Get` from func names `GetCookieSecret` and `GetFeeXPub`.
- Add helpers to encode/decode integers/bytes.
Use randomly generated values of the correct length in test Tickets, rather than using hard-coded and unrealistic values. This code was produced to aid with benchmarking DB performance.
Also fixing some minor typos/errors noticed while working in this file.
This check was added to InsertNewTicket pre-emptivly as a sanity check. It is not strictly required because the fee address itself is also checked, and there is no scenario where we would expect a fee address and its index not to match.
Removing this check eases the route forward to improving database performance.
/payfee will no longer reject tickets with invalid vote choices. The tickets will be registered with the VSP and added to voting wallets, but their voting choices will be empty. A warning will be added to server logs.