Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calculates deltas from unconfirmed transactions in bulk #3581

Merged
merged 1 commit into from
Feb 28, 2023

Conversation

hughy
Copy link
Contributor

@hughy hughy commented Feb 27, 2023

Summary

to calculate the confirmed balance for a nasset we start with the unconfirmed balance and subtract the balance delta for each unconfirmed transaction.

when we calculate confirmed balances for all assets we iterate over unconfirmed transactions once for each asset.

defines 'getUnconfirmedDeltas' to sum the transaction balance deltas for all assets in one pass over unconfirmed transactions.

defines 'getUnconfirmedDelta' to do the same for a particular asset.

adds unit test

removes outdated fixture

Testing Plan

Breaking Change

Is this a breaking change? If yes, add notes below on why this is breaking and
what additional work is required, if any.

[ ] Yes

to calculate the confirmed balance for a nasset we start with the unconfirmed
balance and subtract the balance delta for each unconfirmed transaction.

when we calculate confirmed balances for all assets we iterate over unconfirmed
transactions once for each asset.

defines 'getUnconfirmedDeltas' to sum the transaction balance deltas for all
assets in one pass over unconfirmed transactions.

defines 'getUnconfirmedDelta' to do the same for a particular asset.

adds unit test

removes outdated fixture
@hughy hughy requested a review from a team as a code owner February 27, 2023 22:07
@hughy hughy merged commit b97913f into staging Feb 28, 2023
@hughy hughy deleted the feature/confirmed-efficiency branch February 28, 2023 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants