finalize rebase
This commit is contained in:
parent
4bf14c5650
commit
9fc7e80d48
|
@ -72,18 +72,7 @@ func (k Keeper) GetParams(ctx sdk.Context) (res types.Params) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Need a distinct function because setParams depends on an existing previous
|
// set the params
|
||||||
// record of params to exist (to check if maxValidators has changed) - and we
|
|
||||||
// panic on retrieval if it doesn't exist - hence if we use setParams for the very
|
|
||||||
// first params set it will panic.
|
|
||||||
func (k Keeper) SetParams(ctx sdk.Context, params types.Params) {
|
func (k Keeper) SetParams(ctx sdk.Context, params types.Params) {
|
||||||
if k.MaxValidators(ctx) != params.MaxValidators {
|
|
||||||
k.UpdateBondedValidatorsFull(ctx)
|
|
||||||
}
|
|
||||||
k.SetNewParams(ctx, params)
|
|
||||||
}
|
|
||||||
|
|
||||||
// set the params without updating validator set
|
|
||||||
func (k Keeper) SetNewParams(ctx sdk.Context, params types.Params) {
|
|
||||||
k.paramstore.SetStruct(ctx, ¶ms)
|
k.paramstore.SetStruct(ctx, ¶ms)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue