From 14792f2b23a33219c13bd7ea0c819caf14ae7baf Mon Sep 17 00:00:00 2001 From: rigelrozanski Date: Sat, 22 Sep 2018 13:50:26 -0400 Subject: [PATCH] val comments --- docs/spec/staking/state.md | 8 ++++---- x/stake/keeper/validator.go | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/spec/staking/state.md b/docs/spec/staking/state.md index 9d5e12923..9454aca7d 100644 --- a/docs/spec/staking/state.md +++ b/docs/spec/staking/state.md @@ -43,10 +43,10 @@ type Params struct { Validators are identified according to the `OperatorAddr`, an SDK validator address for the operator of the validator. -Validators also have a `ConsPubKey`, the public key of the validator. The -validator can be retrieved from it's `ConsPubKey` once it can be converted into -the corresponding `ConsAddr`. Validators are indexed in the store using the -following maps: +Validators also have a `ConsPubKey`, the public key of the validator used in +Tendermint consensus. The validator can be retrieved from it's `ConsPubKey` +once it can be converted into the corresponding `ConsAddr`. Validators are +indexed in the store using the following maps: - Validators: `0x02 | OperatorAddr -> amino(validator)` - ValidatorsByConsAddr: `0x03 | ConsAddr -> OperatorAddr` diff --git a/x/stake/keeper/validator.go b/x/stake/keeper/validator.go index ef2256e08..f7c43757f 100644 --- a/x/stake/keeper/validator.go +++ b/x/stake/keeper/validator.go @@ -87,7 +87,6 @@ func (k Keeper) SetValidator(ctx sdk.Context, validator types.Validator) { } // validator index -// TODO change to SetValidatorByConsAddr? used for retrieving from ConsPubkey as well- kinda confusing func (k Keeper) SetValidatorByConsAddr(ctx sdk.Context, validator types.Validator) { store := ctx.KVStore(k.storeKey) consAddr := sdk.ConsAddress(validator.ConsPubKey.Address())