chore: polishing docs and comments (#25109)

Co-authored-by: Alex | Interchain Labs <alex@interchainlabs.io>
This commit is contained in:
dmytroheknt
2025-08-08 16:37:16 +00:00
committed by GitHub
co-authored by Alex | Interchain Labs
parent 4bf6b4217a
commit bb1dcdc0ea
15 changed files with 16 additions and 17 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ func EndBlocker(ctx sdk.Context, keeper *keeper.Keeper) error {
defer telemetry.ModuleMeasureSince(types.ModuleName, telemetry.Now(), telemetry.MetricKeyEndBlocker)
logger := ctx.Logger().With("module", "x/"+types.ModuleName)
// delete dead proposals from store and returns theirs deposits.
// delete dead proposals from store and returns their deposits.
// A proposal is dead when it's inactive and didn't get enough deposit on time to get into voting phase.
rng := collections.NewPrefixUntilPairRange[time.Time, uint64](ctx.BlockTime())
iter, err := keeper.InactiveProposalsQueue.Iterate(ctx, rng)
+2 -2
View File
@@ -619,8 +619,8 @@ func TestExpeditedProposal_PassAndConversionToRegular(t *testing.T) {
require.NotEqual(t, initialModuleAccCoins, intermediateModuleAccCoins)
// Submit proposal deposit + 1 extra top up deposit
expectedIntermediateMofuleAccCoings := initialModuleAccCoins.Add(proposalCoins...).Add(proposalCoins...)
require.Equal(t, expectedIntermediateMofuleAccCoings, intermediateModuleAccCoins)
expectedIntermediateModuleAccCoins := initialModuleAccCoins.Add(proposalCoins...).Add(proposalCoins...)
require.Equal(t, expectedIntermediateModuleAccCoins, intermediateModuleAccCoins)
// block header time at the voting period
newHeader.Time = ctx.BlockHeader().Time.Add(*params.MaxDepositPeriod).Add(*params.VotingPeriod)
+1 -1
View File
@@ -187,7 +187,7 @@ func (p Params) ValidateBasic() error {
return fmt.Errorf("expedited voting period must be positive: %s", p.ExpeditedVotingPeriod)
}
if p.ExpeditedVotingPeriod.Seconds() >= p.VotingPeriod.Seconds() {
return fmt.Errorf("expedited voting period %s must be strictly less that the regular voting period %s", p.ExpeditedVotingPeriod, p.VotingPeriod)
return fmt.Errorf("expedited voting period %s must be strictly less than the regular voting period %s", p.ExpeditedVotingPeriod, p.VotingPeriod)
}
minInitialDepositRatio, err := sdkmath.LegacyNewDecFromStr(p.MinInitialDepositRatio)
+1 -1
View File
@@ -54,7 +54,7 @@ func NewNonSplitVoteOption(option VoteOption) WeightedVoteOptions {
return WeightedVoteOptions{{option, sdkmath.LegacyNewDec(1)}}
}
// WeightedVoteOptions describes array of WeightedVoteOptions
// WeightedVoteOptions describes an array of WeightedVoteOptions
type WeightedVoteOptions []WeightedVoteOption
func (v WeightedVoteOptions) String() (out string) {
-1
View File
@@ -14,7 +14,6 @@ var (
_ sdk.Msg = &MsgUpdateGroupAdmin{}
_ sdk.Msg = &MsgUpdateGroupMetadata{}
_ sdk.Msg = &MsgUpdateGroupMembers{}
_ sdk.Msg = &MsgUpdateGroupMembers{}
_ sdk.Msg = &MsgCreateGroupWithPolicy{}
_ sdk.Msg = &MsgCreateGroupPolicy{}
_ sdk.Msg = &MsgUpdateGroupPolicyAdmin{}
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
View File
@@ -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(
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -11,7 +11,7 @@ option go_package = "cosmossdk.io/x/tx/internal/testpb";
// A is used for testing value renderers.
message A {
// Fields that are parseable by SIGN_MODE_TEXTUAL.
// Fields that are parsable by SIGN_MODE_TEXTUAL.
uint32 UINT32 = 1;
uint64 UINT64 = 2;
int32 INT32 = 3;
+1 -1
View File
@@ -20,7 +20,7 @@ import (
//
// (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"
//
// In pulsar message they represented as strings, which is the only format this encoder supports.
// In pulsar message they are represented as strings, which is the only format this encoder supports.
func cosmosIntEncoder(_ *Encoder, v protoreflect.Value, w io.Writer) error {
switch val := v.Interface().(type) {
case string: