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

fix: we are unable to re-calculate unlocked_authorities if a reorg happened for an address with destroy authority #268

Open
andreabadesso opened this issue Aug 4, 2022 · 0 comments

Comments

@andreabadesso
Copy link
Collaborator

Currently we use the tx_output table to re-calculate the address_balance table after a re-org or a voided transaction is detected

The problem with this approach is that the destroy authority action does not yield any tx_output, so when re-calculating we would never get the correct unlocked_authority for an address that was involved in a re-org, even if the transaction that destroyed an authority was voided

A potential solution would be to use the fullnode APIs to fetch the affected transactions and use that list of transactions to build a balance map to reduce from the existing balances instead of re-calculating the balance using the tx_output inside the wallet-service itself.

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

No branches or pull requests

1 participant