From 91e850b568b244272b5503ecb9d74f02b0e81021 Mon Sep 17 00:00:00 2001 From: Christopher Goes Date: Fri, 6 Apr 2018 13:11:26 +0200 Subject: [PATCH] WIP: Track validator height (closes #582) --- x/stake/keeper.go | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/x/stake/keeper.go b/x/stake/keeper.go index f6aa01c63c..7f35da1a9d 100644 --- a/x/stake/keeper.go +++ b/x/stake/keeper.go @@ -96,24 +96,6 @@ func (k Keeper) setCandidate(ctx sdk.Context, candidate Candidate) { if oldFound { store.Delete(GetValidatorKey(address, oldCandidate.Assets, oldCandidate.ValidatorHeight, k.cdc)) } - - // update the validator block height - candidate.ValidatorHeight = ctx.BlockHeight() - - // update the candidate record - bz, err = k.cdc.MarshalBinary(candidate) - if err != nil { - panic(err) - } - store.Set(GetCandidateKey(candidate.Address), bz) - - // marshal the new validator record - validator := candidate.validator() - bz, err = k.cdc.MarshalBinary(validator) - if err != nil { - panic(err) - } - store.Set(GetValidatorKey(address, validator.Power, validator.Height, k.cdc), bz) // add to the validators to update list if is already a validator