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

Auto claim unstaking #1010

Merged
merged 1 commit into from
Mar 11, 2023
Merged

Auto claim unstaking #1010

merged 1 commit into from
Mar 11, 2023

Conversation

AurevoirXavier
Copy link
Member

@AurevoirXavier AurevoirXavier commented Mar 10, 2023

Auto claim unstaking if it is expired while migrating.

@AurevoirXavier AurevoirXavier changed the title Correct unstaking Auto claim unstaking Mar 10, 2023
Signed-off-by: Xavier Lau <[email protected]>
@AurevoirXavier
Copy link
Member Author

@boundless-forest please also help review this.

@@ -456,7 +456,13 @@ pub mod pallet {
);
}

let now = <frame_system::Pallet<T>>::block_number();

l.unstaking_ring.retain(|(_, t)| t > &now);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait, where do the removed unstaking_ring go? not in free right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, so free includes staked and unstaking, deposits.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The unstaking part belong to the user now. It'll transfer to the staking_pot account later.

Copy link
Member

@boundless-forest boundless-forest Mar 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not so sure that it should be t > &now or t >= &now here?

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link

Check 62cf5e4 pangoro-dev

Check runtime version

Check runtime storage

@github-actions
Copy link

Check 62cf5e4 crab-dev

Check runtime version

Check runtime storage

@github-actions
Copy link

Check 62cf5e4 pangolin-dev

Check runtime version

Check runtime storage

@github-actions
Copy link

Check 62cf5e4 darwinia-dev

Check runtime version

Check runtime storage

@AurevoirXavier AurevoirXavier merged commit 34db767 into main Mar 11, 2023
@AurevoirXavier AurevoirXavier deleted the xavier/unstaking branch March 11, 2023 02:10
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.

3 participants