chore: polishing docs and comments (#25109)
Co-authored-by: Alex | Interchain Labs <alex@interchainlabs.io>
This commit is contained in:
co-authored by
Alex | Interchain Labs
parent
4bf6b4217a
commit
bb1dcdc0ea
@@ -42,7 +42,7 @@ func WriteValidators(ctx sdk.Context, keeper *keeper.Keeper) (vals []cmttypes.Ge
|
||||
}
|
||||
|
||||
// ValidateGenesis validates the provided staking genesis state to ensure the
|
||||
// expected invariants holds. (i.e. params in correct bounds, no duplicate validators)
|
||||
// expected invariants hold. (i.e. params in correct bounds, no duplicate validators)
|
||||
func ValidateGenesis(data *types.GenesisState) error {
|
||||
if err := validateGenesisStateValidators(data.Validators); err != nil {
|
||||
return err
|
||||
|
||||
@@ -27,7 +27,7 @@ import (
|
||||
)
|
||||
|
||||
func BenchmarkApplyAndReturnValidatorSetUpdates(b *testing.B) {
|
||||
// goal of this benchmark to measure the performance changes in ApplyAndReturnValidatorSetUpdates
|
||||
// goal of this benchmark is to measure the performance changes in ApplyAndReturnValidatorSetUpdates
|
||||
// for dropping the bech32 conversion and different index types.
|
||||
// therefore the validator power, max or state is not modified to focus on comparing the valset
|
||||
// for an update only.
|
||||
|
||||
+1
-1
@@ -295,7 +295,7 @@ func (am AppModule) RegisterStoreDecoder(sdr simtypes.StoreDecoderRegistry) {
|
||||
sdr[types.StoreKey] = simulation.NewDecodeStore(am.cdc)
|
||||
}
|
||||
|
||||
// WeightedOperations returns the all the staking module operations with their respective weights.
|
||||
// WeightedOperations returns all the staking module operations with their respective weights.
|
||||
// migrate to WeightedOperationsX. This method is ignored when WeightedOperationsX exists and will be removed in the future
|
||||
func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation {
|
||||
return simulation.WeightedOperations(
|
||||
|
||||
@@ -25,7 +25,7 @@ const (
|
||||
// DefaultMaxEntries in a UBD/RED pair
|
||||
DefaultMaxEntries uint32 = 7
|
||||
|
||||
// DefaultHistoricalEntries entries is 10000. Apps that don't use IBC can ignore this
|
||||
// DefaultHistoricalEntries is 10000. Apps that don't use IBC can ignore this
|
||||
// value by not adding the staking module to the application module manager's
|
||||
// SetOrderBeginBlockers.
|
||||
DefaultHistoricalEntries uint32 = 10000
|
||||
|
||||
@@ -75,7 +75,7 @@ func TestRemoveTokens(t *testing.T) {
|
||||
validator = validator.RemoveTokens(math.NewInt(10))
|
||||
require.Equal(t, int64(90), validator.Tokens.Int64())
|
||||
|
||||
// update validator to from bonded -> unbonded
|
||||
// update validator from bonded -> unbonded
|
||||
validator = validator.UpdateStatus(types.Unbonded)
|
||||
require.Equal(t, types.Unbonded, validator.Status)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user