[sql-3] accounts: replace calls to UpdateAccount #939
+456
−103
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.
(similar PR description to #938 but they are not dependent on each other)
To prepare the
accounts.Store
to be more SQL compatible, we will want to replace the currentUpdateAccount
method. Today it takes a fullOffChainAccount
struct, serialises it and replacesany existing in the DB. This method is not very SQL appropriate as the better pattern is to instead
have specific update methods that read: "Update field X and account with ID Y".
So this PR starts this process of adding more SQL friendly methods to the interface and thereby
phasing out the use of
UpdateAccount
. By doing so, we also move very kvdb specific logic outof the
accounts.InterceptorService
.I'm splitting this up over about 3 or 4 PRs since some of the replacements are more complicated than
others.
This PR focuses on the calls that edit/add account payments:
UpsertAccountPayment
DeleteAccountPayment