Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Full Unbond in Staking #3811
base: master
Are you sure you want to change the base?
Full Unbond in Staking #3811
Changes from 10 commits
c6e4c93
12e62a9
345b2fa
0b8ef9e
df5c186
23e98b5
66d9b61
0292c5f
9db89f3
4d449bf
716723f
a026b88
269934e
507a617
9f3a8db
a6731a6
e01c986
62766c2
91b5e8b
f1b87f9
f92a40e
6de3833
88f5c35
c1cc0cb
7d28f72
0237e71
215ae86
52ad45f
bf9680a
11d1ddf
96667b1
14212e8
f19177f
945f69d
aca4c8f
36d8564
38705e6
95e61d0
30015c7
4536363
06e8563
2fc715a
766458c
16f6535
280c3a1
bcc222d
9c62abc
1ea562f
30b23d1
05f25f9
d7e3cac
c47d381
67034ab
6c91ffc
e65b728
a187b0d
5e34df5
936b12f
03392ac
66ce2ed
6f89fe4
d9eb3e5
6c884cc
7b89287
21c0d3e
07901f4
16ebadd
adcf410
d2e016e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
github doesn't allow me to add comment on the non changed line
1090
so adding here.Add chill weight to the call so in worst case it always adds chill weight.
Additional info: Before any transaction this fund is reserved, and any difference in the PostInfo is refunded. So this should always contain the worst case weight.
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.
Because of this, you may want to check
value >= ledger.total
instead.Alternatively, you can move the ceiling logic
let mut value = value.min(ledger.active)
to this function.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.
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.
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.
One last check is to ensure that the stash is actually chilled instead of only relying on the events above. e.g.
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.
i have done this
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.
Probably I am missing something but I don't see the asserts?
EDIT: in case github misplaces the comment, I am referring to @gpestana's comment here
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.
Yeah, so what i did is to do this check
assert!(!Validators::<Test>::contains_key(11));
This ensures the Validators does not contain 11 after the event.
I have also included checking the total count of the validators before and after unbonding.
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.
@tdimitrov
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.