-
Notifications
You must be signed in to change notification settings - Fork 414
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 migration logic #1172
Fix migration logic #1172
Conversation
Minimum allowed line rate is |
@@ -373,17 +373,19 @@ pub mod pallet { | |||
pub(crate) fn migrate_ledger() -> Result<Weight, Weight> { | |||
match OldLedger::<T>::drain().next() { | |||
Some((staker, old_account_ledger)) => { | |||
let locked = old_account_ledger.locked; | |||
let old_locked = old_account_ledger.locked; | |||
|
|||
// Old unbonding amount can just be released, to keep things simple. | |||
// Alternative is to re-calculate this into unlocking chunks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the comment still relevant ? I guess we are not going for the Alternative
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not relevant 🙂
But we can delete the whole pallet after this is merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Pull Request Summary
Fix for migration logic to ensure unbonding chunks are released.