-
Notifications
You must be signed in to change notification settings - Fork 155
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
Ensure definition of IsMature
(cosmos-sdk/x/staking/types/validator.go) bug free
#111
Comments
Hi @danwt. This issue was already discussed on Slack. Copying here the conversation: There are two events of interest here:
The edge case entails equality in the check for maturity in case of event B. Event A always happens in the Event B is triggered by an external module calling So, there are two options to go about it:
For the second option,
|
@danwt Do you agree? |
Yep, it makes sense! |
The logic in #111 (comment) may be broken since |
As of
|
Issue fixed by |
In
validatorUnbondingCanComplete
the following codehttps://github.com/cosmos/cosmos-sdk/blob/4cc285142ba73844e2c5929dedef59fa6db0f748/x/staking/keeper/unbonding.go#L326-L336
calls
https://github.com/cosmos/cosmos-sdk/blob/4cc285142ba73844e2c5929dedef59fa6db0f748/x/staking/types/validator.go#L180-L183
which has a different definition of maturity in
UnbondAllMatureValidators
https://github.com/cosmos/cosmos-sdk/blob/4cc285142ba73844e2c5929dedef59fa6db0f748/x/staking/keeper/validator.go#L420
and seems suspicious.
The text was updated successfully, but these errors were encountered: