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
pow-migration: Fix detection of switching validator in pre-stake #2403
Conversation
58b5dd5
to
5efba36
Compare
@jsdanielh I do think this is still prone to incorrect outcomes. I believe To make this easier to reason about, and since stake can jump around validators quite a lot, is that you compute the total stake of a validator in a second loop after you've done processing all the transactions in |
5efba36
to
e96035d
Compare
Makes sense. Just made the change to implement this. |
e96035d
to
7ef415f
Compare
7ef415f
to
ac3c663
Compare
LGTM |
Fix the detection of switching validator in pre-stake as it was filtering always transactions that didn't have the minimum stake but for switching to another validator in pre-stake, the stake is already above the minimum since it was already counted to another validator. This fixes #2399.
ac3c663
to
6c92a6a
Compare
Fix the detection of switching validator in pre-stake as it was filtering always transactions that didn't have the minimum stake but for switching to another validator in pre-stake, the stake is already above the minimum since it was already counted to another validator.
This fixes #2399.
Pull request checklist
clippy
andrustfmt
warnings.