From 7d55bd1a3653c42655f13f80847c5525c6642b85 Mon Sep 17 00:00:00 2001 From: Christopher Goes Date: Mon, 10 Dec 2018 16:13:26 +0100 Subject: [PATCH] Merge PR #3063: Fix linter --- x/stake/keeper/test_common.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/x/stake/keeper/test_common.go b/x/stake/keeper/test_common.go index f52b41c44..c3ca811cd 100644 --- a/x/stake/keeper/test_common.go +++ b/x/stake/keeper/test_common.go @@ -227,15 +227,14 @@ func TestingUpdateValidator(keeper Keeper, ctx sdk.Context, validator types.Vali panic("validator expected but not found") } return validator - } else { - cachectx, _ := ctx.CacheContext() - keeper.ApplyAndReturnValidatorSetUpdates(cachectx) - validator, found := keeper.GetValidator(cachectx, validator.OperatorAddr) - if !found { - panic("validator expected but not found") - } - return validator } + cachectx, _ := ctx.CacheContext() + keeper.ApplyAndReturnValidatorSetUpdates(cachectx) + validator, found := keeper.GetValidator(cachectx, validator.OperatorAddr) + if !found { + panic("validator expected but not found") + } + return validator } func validatorByPowerIndexExists(k Keeper, ctx sdk.Context, power []byte) bool {