val comments
This commit is contained in:
parent
a2b2ef92f2
commit
14792f2b23
|
@ -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`
|
||||
|
|
|
@ -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())
|
||||
|
|
Loading…
Reference in New Issue