docs: correct spelling errors across multiple packages (#25020)

Co-authored-by: Alex | Interchain Labs <alex@interchainlabs.io>
This commit is contained in:
Micke 2025-07-28 21:21:50 +02:00 committed by GitHub
parent 15de68f27a
commit beb8b0a8b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 10 additions and 11 deletions

View File

@ -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.

View File

@ -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()
}

View File

@ -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())

View File

@ -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]}
}

View File

@ -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()
}

View File

@ -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 = "<strategy>"` 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'

View File

@ -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 ||

View File

@ -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)

View File

@ -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

View File

@ -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},
}