vsp: Rewrite client for persistent bg processing #1956
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change involves almost a complete rewrite of the vsp client
package, removing the syncing goroutines and instead placing methods
of a feePayment structure on a timer at randomized intervals to
perform each step with the VSP.
One design goal of this change is to ensure that all interactive vsp
client usage is performed on a feePayment structure that is also being
background processed. This allows fee payment processing to continue
even if the VSP client was temporarily created and not actively
syncing new tickets.
Another separate goal of this rewrite is to allow the client to query
the VSP for tickets that have been processed by the VSP, but are not
recorded as such in the wallet's database. This will be used to
recover fee payment information for tickets after seed restores.