From beb8b0a8b6311ba1ac0b6748035845fc16a80292 Mon Sep 17 00:00:00 2001 From: Micke <155267459+reallesee@users.noreply.github.com> Date: Mon, 28 Jul 2025 21:21:50 +0200 Subject: [PATCH] docs: correct spelling errors across multiple packages (#25020) Co-authored-by: Alex | Interchain Labs --- simapp/app_di.go | 2 +- store/gaskv/store.go | 2 +- store/mem/mem_test.go | 2 +- store/metrics/telemetry.go | 4 ++-- store/prefix/store.go | 2 +- store/pruning/README.md | 2 +- store/pruning/manager.go | 2 +- store/pruning/manager_test.go | 2 +- store/pruning/types/options.go | 2 +- store/pruning/types/options_test.go | 1 - 10 files changed, 10 insertions(+), 11 deletions(-) diff --git a/simapp/app_di.go b/simapp/app_di.go index 974bdf9adf..8abbfe2615 100644 --- a/simapp/app_di.go +++ b/simapp/app_di.go @@ -142,7 +142,7 @@ func NewSimApp( // // STAKING // - // For provinding a different validator and consensus address codec, add it below. + // For providing a different validator and consensus address codec, add it below. // By default the staking module uses the bech32 prefix provided in the auth config, // and appends "valoper" and "valcons" for validator and consensus addresses respectively. // When providing a custom address codec in auth, custom address codecs must be provided here as well. diff --git a/store/gaskv/store.go b/store/gaskv/store.go index d1a186862f..75d379a03e 100644 --- a/store/gaskv/store.go +++ b/store/gaskv/store.go @@ -121,7 +121,7 @@ func newGasIterator(gasMeter types.GasMeter, gasConfig types.GasConfig, parent t } } -// Domain implements Iterator, getting the underlying iterator's domain'. +// Domain implements Iterator, getting the underlying iterator's domain. func (gi *gasIterator) Domain() (start, end []byte) { return gi.parent.Domain() } diff --git a/store/mem/mem_test.go b/store/mem/mem_test.go index 6595b45dce..c1fcd937c0 100644 --- a/store/mem/mem_test.go +++ b/store/mem/mem_test.go @@ -46,7 +46,7 @@ func TestCommit(t *testing.T) { require.Equal(t, value, db.Get(key)) } -func TestStorePrunningOptions(t *testing.T) { +func TestStorePruningOptions(t *testing.T) { // this is a no-op db := mem.NewStore() require.Equal(t, pruningtypes.NewPruningOptions(pruningtypes.PruningUndefined), db.GetPruning()) diff --git a/store/metrics/telemetry.go b/store/metrics/telemetry.go index d5bc55c45b..862279500a 100644 --- a/store/metrics/telemetry.go +++ b/store/metrics/telemetry.go @@ -25,8 +25,8 @@ type Metrics struct { func NewMetrics(labels [][]string) Metrics { gatherer := Metrics{} - if numGlobalLables := len(labels); numGlobalLables > 0 { - parsedGlobalLabels := make([]metrics.Label, numGlobalLables) + if numGlobalLabels := len(labels); numGlobalLabels > 0 { + parsedGlobalLabels := make([]metrics.Label, numGlobalLabels) for i, gl := range labels { parsedGlobalLabels[i] = metrics.Label{Name: gl[0], Value: gl[1]} } diff --git a/store/prefix/store.go b/store/prefix/store.go index 40b65fd8da..c4e33d2f7e 100644 --- a/store/prefix/store.go +++ b/store/prefix/store.go @@ -42,7 +42,7 @@ func (s Store) key(key []byte) (res []byte) { return } -// GetStoreType implements Store, returning the parent store's type' +// GetStoreType implements Store, returning the parent store's type func (s Store) GetStoreType() types.StoreType { return s.parent.GetStoreType() } diff --git a/store/pruning/README.md b/store/pruning/README.md index 2548807e2a..723b4e0eed 100644 --- a/store/pruning/README.md +++ b/store/pruning/README.md @@ -10,7 +10,7 @@ the states and prune nothing. On the other hand, a regular validator node may wa The strategies are configured in `app.toml`, with the format `pruning = ""` where the options are: -* `default`: only the last 362,880 states(approximately 3.5 weeks worth of state) are kept; pruning at 10 block intervals +* `default`: only the last 362,880 states (approximately 3.5 weeks worth of state) are kept; pruning at 10 block intervals * `nothing`: all historic states will be saved, nothing will be deleted (i.e. archiving node) * `everything`: 2 latest states will be kept; pruning at 10 block intervals. * `custom`: allow pruning options to be manually specified through 'pruning-keep-recent', and 'pruning-interval' diff --git a/store/pruning/manager.go b/store/pruning/manager.go index d4138a0218..f909cb3174 100644 --- a/store/pruning/manager.go +++ b/store/pruning/manager.go @@ -134,7 +134,7 @@ func (m *Manager) SetSnapshotInterval(snapshotInterval uint64) { m.snapshotInterval = snapshotInterval } -// GetPruningHeight returns the height which can prune upto if it is able to prune at the given height. +// GetPruningHeight returns the height which can prune up to if it is able to prune at the given height. func (m *Manager) GetPruningHeight(height int64) int64 { if m.opts.GetPruningStrategy() == types.PruningNothing || m.opts.Interval <= 0 || diff --git a/store/pruning/manager_test.go b/store/pruning/manager_test.go index 069ac42cf2..bba3d47c49 100644 --- a/store/pruning/manager_test.go +++ b/store/pruning/manager_test.go @@ -383,7 +383,7 @@ func TestHandleSnapshotHeight_LoadFromDisk(t *testing.T) { expected := 0 for snapshotHeight := int64(-1); snapshotHeight < 100; snapshotHeight++ { - snapshotHeightStr := fmt.Sprintf("snaphost height: %d", snapshotHeight) + snapshotHeightStr := fmt.Sprintf("snapshot height: %d", snapshotHeight) if snapshotHeight > int64(snapshotInterval) && snapshotHeight%int64(snapshotInterval) == 1 { // Test flush manager.HandleSnapshotHeight(snapshotHeight - 1) diff --git a/store/pruning/types/options.go b/store/pruning/types/options.go index cd68c3836a..ff3d154d98 100644 --- a/store/pruning/types/options.go +++ b/store/pruning/types/options.go @@ -40,7 +40,7 @@ const ( // pruned at every 10th height. PruningEverything // PruningNothing defines a pruning strategy where all heights are kept on disk. - // This is the only stretegy where KeepEvery=1 is allowed with state-sync snapshots disabled. + // This is the only strategy where KeepEvery=1 is allowed with state-sync snapshots disabled. PruningNothing // PruningCustom defines a pruning strategy where the user specifies the pruning. PruningCustom diff --git a/store/pruning/types/options_test.go b/store/pruning/types/options_test.go index 593b494949..f1a6f276f4 100644 --- a/store/pruning/types/options_test.go +++ b/store/pruning/types/options_test.go @@ -21,7 +21,6 @@ func TestPruningOptions_Validate(t *testing.T) { {NewCustomPruningOptions(1, 10), ErrPruningKeepRecentTooSmall}, {NewCustomPruningOptions(2, 9), ErrPruningIntervalTooSmall}, {NewCustomPruningOptions(2, 0), ErrPruningIntervalZero}, - {NewCustomPruningOptions(2, 0), ErrPruningIntervalZero}, {NewCustomPruningOptions(math.MaxInt64+1, 10), ErrPruningKeepRecentTooBig}, }