chore: polishing docs and comments: typo fixes for clarity (#25081)
Co-authored-by: Alex | Interchain Labs <alex@interchainlabs.io>
This commit is contained in:
parent
2ff43141b2
commit
ec4ee1cb19
@ -103,7 +103,7 @@ responsibility of the caller to ensure that concurrent access to the store is
|
||||
not performed.
|
||||
|
||||
The main issue with concurrent use is when data is written at the same time as
|
||||
it's being iterated over. Doing so will cause a irrecoverable fatal error because
|
||||
it's being iterated over. Doing so will cause an irrecoverable fatal error because
|
||||
of concurrent reads and writes to an internal map.
|
||||
|
||||
Although it's not recommended, you can iterate through values while writing to
|
||||
|
||||
@ -7,7 +7,7 @@ details.
|
||||
|
||||
This package provides a broad range of errors declared that fits all common
|
||||
cases. If an error is very specific for an extension it can be registered outside
|
||||
of the errors package. If it will be needed my many extensions, please consider
|
||||
of the errors package. If it will be needed by many extensions, please consider
|
||||
registering it in the errors package. To create a new error instance use Register
|
||||
function. You must provide a unique, non zero error code and a short description, for example:
|
||||
|
||||
|
||||
@ -186,7 +186,7 @@ func isNilErr(err error) bool {
|
||||
// it will be labeled as internal error.
|
||||
//
|
||||
// If err is nil, this returns nil, avoiding the need for an if statement when
|
||||
// wrapping a error returned at the end of a function
|
||||
// wrapping an error returned at the end of a function
|
||||
func Wrap(err error, description string) error {
|
||||
if err == nil {
|
||||
return nil
|
||||
|
||||
@ -86,7 +86,7 @@ func TestSetArgsWithWrappedMethod(t *testing.T) {
|
||||
f := cmd.Flags()
|
||||
f.BoolP("a", "a", false, "check built-in pflag.Value")
|
||||
f.IntSlice("b", []int{1, 2}, "check built-in pflag.SliceValue with default value")
|
||||
f.IntSliceP("c", "c", nil, "check built pflag.SliceValue with nil default value")
|
||||
f.IntSliceP("c", "c", nil, "check built-in pflag.SliceValue with nil default value")
|
||||
f.Var(&mockFlagWithCommaD, "d", "check custom implementation of pflag.SliceValue with splitting by comma and default value")
|
||||
f.VarP(&mockFlagWithCommaE, "e", "e", "check custom implementation of pflag.SliceValue with splitting by comma and nil default value")
|
||||
f.Var(&mockFlagWithSemicolonF, "f", "check custom implementation of pflag.SliceValue with splitting by semicolon and default value")
|
||||
|
||||
@ -140,7 +140,7 @@ Ref: https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.j
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* [#15506](https://github.com/cosmos/cosmos-sdk/issues/16605) Dec marshal shouldn't have side effects
|
||||
* [#15506](https://github.com/cosmos/cosmos-sdk/pull/15506) Dec marshal shouldn't have side effects
|
||||
|
||||
## [math/v1.0.0-rc.0](https://github.com/cosmos/cosmos-sdk/releases/tag/math/v1.0.0-rc.0) - 2023-03-13
|
||||
|
||||
|
||||
@ -92,7 +92,7 @@ func (a *App) RegisterModules(modules ...module.AppModule) error {
|
||||
|
||||
// RegisterStores registers the provided store keys.
|
||||
// This method should only be used for registering extra stores
|
||||
// wiich is necessary for modules that not registered using the app config.
|
||||
// which is necessary for modules that not registered using the app config.
|
||||
// To be used in combination of RegisterModules.
|
||||
func (a *App) RegisterStores(keys ...storetypes.StoreKey) error {
|
||||
a.storeKeys = append(a.storeKeys, keys...)
|
||||
|
||||
@ -32,7 +32,7 @@ func NewEventManager(ctx context.Context) event.Manager {
|
||||
return &Events{sdkCtx.EventManager()}
|
||||
}
|
||||
|
||||
// Emit emits an typed event that is defined in the protobuf file.
|
||||
// Emit emits a typed event that is defined in the protobuf file.
|
||||
// In the future these events will be added to consensus.
|
||||
func (e Events) Emit(_ context.Context, event protoiface.MessageV1) error {
|
||||
return e.EmitTypedEvent(event)
|
||||
|
||||
@ -71,7 +71,7 @@ func bindFlags(basename string, cmd *cobra.Command, v *viper.Viper) (err error)
|
||||
|
||||
cmd.Flags().VisitAll(func(f *pflag.Flag) {
|
||||
// Environment variables can't have dashes in them, so bind them to their equivalent
|
||||
// keys with underscores, e.g. --favorite-color to STING_FAVORITE_COLOR
|
||||
// keys with underscores, e.g. --favorite-color to STRING_FAVORITE_COLOR
|
||||
err = v.BindEnv(f.Name, fmt.Sprintf("%s_%s", basename, strings.ToUpper(strings.ReplaceAll(f.Name, "-", "_"))))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
||||
@ -401,7 +401,7 @@ func TestInterceptConfigsPreRunHandlerPrecedenceConfigDefault(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure that if interceptConfigs encounters any error other than non-existen errors
|
||||
// Ensure that if interceptConfigs encounters any error other than non-existent errors
|
||||
// that we correctly return the offending error, for example a permission error.
|
||||
// See https://github.com/cosmos/cosmos-sdk/issues/7578
|
||||
func TestInterceptConfigsWithBadPermissions(t *testing.T) {
|
||||
|
||||
@ -21,7 +21,7 @@ func benchmarkBlankParentIteratorNext(b *testing.B, keysize int) {
|
||||
// Use a singleton for value, to not waste time computing it
|
||||
value := randSlice(defaultValueSizeBz)
|
||||
// Use simple values for keys, pick a random start,
|
||||
// and take next b.N keys sequentially after.]
|
||||
// and take next b.N keys sequentially after.
|
||||
startKey := randSlice(32)
|
||||
|
||||
// Add 1 to avoid issues when b.N = 1
|
||||
|
||||
@ -628,7 +628,7 @@ func (rs *Store) CacheMultiStoreWithVersion(version int64) (types.CacheMultiStor
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// If the store donesn't exist at this version, create a dummy one to prevent
|
||||
// If the store doesn't exist at this version, create a dummy one to prevent
|
||||
// nil pointer panic in newer query APIs.
|
||||
cacheStore = dbadapter.Store{DB: dbm.NewMemDB()}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user