chore: polishing docs and comments (#25109)
Co-authored-by: Alex | Interchain Labs <alex@interchainlabs.io>
This commit is contained in:
parent
4bf6b4217a
commit
bb1dcdc0ea
@ -181,7 +181,7 @@ Examples:
|
||||
cmd.Flags().StringSlice(FlagAllowedMsgs, []string{}, "Set of allowed messages for fee allowance")
|
||||
cmd.Flags().String(FlagExpiration, "", "The RFC 3339 timestamp after which the grant expires for the user")
|
||||
cmd.Flags().String(FlagSpendLimit, "", "Spend limit specifies the max limit can be used, if not mentioned there is no limit")
|
||||
cmd.Flags().Int64(FlagPeriod, 0, "period specifies the time duration(in seconds) in which period_limit coins can be spent before that allowance is reset (ex: 3600)")
|
||||
cmd.Flags().Int64(FlagPeriod, 0, "period specifies the time duration (in seconds) in which period_limit coins can be spent before that allowance is reset (ex: 3600)")
|
||||
cmd.Flags().String(FlagPeriodLimit, "", "period limit specifies the maximum number of coins that can be spent in the period")
|
||||
|
||||
return cmd
|
||||
|
||||
@ -114,7 +114,7 @@ func TestFilteredFeeValidAllow(t *testing.T) {
|
||||
blockTime: now,
|
||||
accept: false,
|
||||
},
|
||||
"with out spend limit": {
|
||||
"without spend limit": {
|
||||
allowance: &feegrant.BasicAllowance{
|
||||
Expiration: &oneHour,
|
||||
},
|
||||
|
||||
@ -401,7 +401,7 @@ const (
|
||||
VoteAbstain = 0x4
|
||||
)
|
||||
|
||||
type ProposalType string
|
||||
type ProposalType string
|
||||
|
||||
const (
|
||||
ProposalTypePlainText = "Text"
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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{}
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
@ -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;
|
||||
@ -104,4 +104,4 @@ message Ballot {
|
||||
string voter = 2;
|
||||
reserved 3;
|
||||
repeated WeightedBallotOption options = 4;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user