-
Notifications
You must be signed in to change notification settings - Fork 21
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
chore: Allow unbonding time to be min unbonding value #278
Conversation
481e2b2
to
b152dea
Compare
@@ -110,6 +111,10 @@ func (ms msgServer) UpdateParams(goCtx context.Context, req *types.MsgUpdatePara | |||
} | |||
|
|||
ctx := sdk.UnwrapSDKContext(goCtx) | |||
if req.Params.CheckpointFinalizationTimeout != ms.k.GetParams(ctx).CheckpointFinalizationTimeout { |
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.
can we add a comment here on why it can't be changed?
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.
just minor comment
@@ -206,6 +201,6 @@ func ValidateParsedMessageAgainstTheParams( | |||
return &ParamsValidationResult{ | |||
StakingOutputIdx: stakingOutputIdx, | |||
UnbondingOutputIdx: 0, // unbonding output always has only 1 output | |||
MinUnbondingTime: minUnbondingTime, | |||
MinUnbondingTime: parameters.MinUnbondingTimeBlocks, |
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.
as we no longer calculate valid MinUnbondingTime
in this functions, we can probably remove this field from ParamsValidationResult
. (the caller has access to parameters.MinUnbondingTimeBlocks
eitherway)
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.
Good point. Fixed in 6b4abc7
Closes #263. In particular,
checkpointFinalizationTimeout
can never be changed in the update params handler of the btccheckpoint moduleminUnbondingTime
can not be set to a value less than or equal tocheckpointFinalizationTimeout
in the update params handler of the btcstaking moduleunbondingTime
of a delegation to be set to a value equals tominUnbondingTime