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.
Issue being fixed or feature implemented
In RS-Drive atomicity of state transitions is paramount. A state transition is a collection of multiple operations that often will cause one or more identity balances to change. The amount that the identity balance must change by is driven by costs of changes in the batch. Ideally we should be able to alter the batch by adding operations based on calculated information coming from the batch itself.
For example in one batch have the document insertion, but also the reduction of credits of the identity due to the document insertion.
What was done?
To be able to perform this feature, we need to get back costs from an insertion, then perform just in time updates to the batch, this is what is coded up in this PR.
How Has This Been Tested?
Added some unit tests
Breaking Changes
No breaking changes
Checklist:
For repository code-owners and collaborators only