-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Test case not working as expected: nominators_also_get_slashed
#5838
Comments
nominators_also_get_slashed
nominators_also_get_slashed
One problem I see is that the test is nominating the controller key of the validator instead of the stash key. If I change it to nominate the stash key then the Here are the changes that I mentioned above: maxsam4@84b756c With 105% slashing, the validator loses 100% of their stake, and the nominator loses 0% (test fails). |
CC @kianenigma |
I haven't looked into it in detail but it could very well be the case. Many of the staking tests are
I'll take a look soon, thanks for raising it. related: #5244
Yeah in this case nominators don't even exist to be slashed.
Most likely just a misconfiguration. |
Hey @kianenigma, did you get a chance to look at it? |
Done, thanks for the reminder. Much needed 👍 . |
The intent of
substrate/frame/staking/src/tests.rs
Line 536 in 268450a
is to make sure that nominators also get slashed but in the test,
nominator_slash
is equal to 0 and the test is checking that a slash of 0 is applied which is equivalent of no slash at all.In addition, the
others
vector in the validator's exposure is an empty array which suggests that no nominators are going to be slashed.I'm not sure if it's just some misconfigured test case or a bug in the code but in any case, I don't think the test case is verifying what it was meant to verify.
The text was updated successfully, but these errors were encountered: