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
|
Validators are identified according to the `OperatorAddr`, an SDK validator
|
||||||
address for the operator of the validator.
|
address for the operator of the validator.
|
||||||
|
|
||||||
Validators also have a `ConsPubKey`, the public key of the validator. The
|
Validators also have a `ConsPubKey`, the public key of the validator used in
|
||||||
validator can be retrieved from it's `ConsPubKey` once it can be converted into
|
Tendermint consensus. The validator can be retrieved from it's `ConsPubKey`
|
||||||
the corresponding `ConsAddr`. Validators are indexed in the store using the
|
once it can be converted into the corresponding `ConsAddr`. Validators are
|
||||||
following maps:
|
indexed in the store using the following maps:
|
||||||
|
|
||||||
- Validators: `0x02 | OperatorAddr -> amino(validator)`
|
- Validators: `0x02 | OperatorAddr -> amino(validator)`
|
||||||
- ValidatorsByConsAddr: `0x03 | ConsAddr -> OperatorAddr`
|
- ValidatorsByConsAddr: `0x03 | ConsAddr -> OperatorAddr`
|
||||||
|
|
|
@ -87,7 +87,6 @@ func (k Keeper) SetValidator(ctx sdk.Context, validator types.Validator) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// validator index
|
// 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) {
|
func (k Keeper) SetValidatorByConsAddr(ctx sdk.Context, validator types.Validator) {
|
||||||
store := ctx.KVStore(k.storeKey)
|
store := ctx.KVStore(k.storeKey)
|
||||||
consAddr := sdk.ConsAddress(validator.ConsPubKey.Address())
|
consAddr := sdk.ConsAddress(validator.ConsPubKey.Address())
|
||||||
|
|
Loading…
Reference in New Issue