From 9fc7e80d4808be0a1475fb2e1f07c075a860956a Mon Sep 17 00:00:00 2001 From: mossid Date: Sun, 7 Oct 2018 01:16:11 +0900 Subject: [PATCH] finalize rebase --- x/stake/keeper/params.go | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/x/stake/keeper/params.go b/x/stake/keeper/params.go index ce447be540..7040cf44e3 100644 --- a/x/stake/keeper/params.go +++ b/x/stake/keeper/params.go @@ -72,18 +72,7 @@ func (k Keeper) GetParams(ctx sdk.Context) (res types.Params) { return } -// Need a distinct function because setParams depends on an existing previous -// 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. +// set the 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) }