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

Deduplicating balance updates due to vote balance #3303

Closed
rainydio opened this issue Nov 25, 2019 · 2 comments
Closed

Deduplicating balance updates due to vote balance #3303

rainydio opened this issue Nov 25, 2019 · 2 comments

Comments

@rainydio
Copy link
Contributor

rainydio commented Nov 25, 2019

Currently wallet manager keeps track of vote balances, which leads to it duplicating all of the logic that is within handlers (and some other places). Although current implementation works just fine extending it with new handlers is difficult.

Possible Solution

Deduplicating all of that in one go is a challenging task that not a single person would be able to review. The task has to be split into several small PRs each building on top of the other.

#3298 move apply and revert block functions out of wallet

It seems that wallet class was intended to be modified externally. Apply and revert block functions were the only ones containing any update code. Wallet manager contains same exact code in its apply and revert block functions. Removing those functions from wallet and refactoring wallet manager seems like a natural first step.

#3306 remove build vote balances function

Build vote balance is a misplaced bootstrap function which is running over recently restored wallet manager. Instead bootstrap method in transaction handlers should also set correct vote balances.

@ghost
Copy link

ghost commented Nov 25, 2019

Thanks for opening this issue! A maintainer will review this in the next few days and explicitly select labels so you know what's going on.

If no reviewer appears after a week, a reminder will be sent out.

@ghost
Copy link

ghost commented Nov 26, 2019

This issue has been closed. If you wish to re-open it please provide additional information.

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