diff --git a/store/cachekv/store.go b/store/cachekv/store.go index 08cfc2b325..879ce2a416 100644 --- a/store/cachekv/store.go +++ b/store/cachekv/store.go @@ -303,7 +303,7 @@ func (store *Store) dirtyItems(start, end []byte) { n := len(store.unsortedCache) unsorted := make([]*kv.Pair, 0) // If the unsortedCache is too big, its costs too much to determine - // whats in the subset we are concerned about. + // what's in the subset we are concerned about. // If you are interleaving iterator calls with writes, this can easily become an // O(N^2) overhead. // Even without that, too many range checks eventually becomes more expensive diff --git a/store/cachekv/store_test.go b/store/cachekv/store_test.go index 3c56223554..c8f103aa19 100644 --- a/store/cachekv/store_test.go +++ b/store/cachekv/store_test.go @@ -32,7 +32,7 @@ func TestCacheKVStore(t *testing.T) { st.Set(keyFmt(1), valFmt(1)) require.Equal(t, valFmt(1), st.Get(keyFmt(1))) - // update it in cache, shoudn't change mem + // update it in cache, shouldn't change mem st.Set(keyFmt(1), valFmt(2)) require.Equal(t, valFmt(2), st.Get(keyFmt(1))) require.Equal(t, valFmt(1), mem.Get(keyFmt(1))) diff --git a/store/dbadapter/store.go b/store/dbadapter/store.go index 013e26df20..369a173ec1 100644 --- a/store/dbadapter/store.go +++ b/store/dbadapter/store.go @@ -15,7 +15,7 @@ type Store struct { dbm.DB } -// Get wraps the underlying DB's Get method panicing on error. +// Get wraps the underlying DB's Get method panicking on error. func (dsa Store) Get(key []byte) []byte { v, err := dsa.DB.Get(key) if err != nil { @@ -25,7 +25,7 @@ func (dsa Store) Get(key []byte) []byte { return v } -// Has wraps the underlying DB's Has method panicing on error. +// Has wraps the underlying DB's Has method panicking on error. func (dsa Store) Has(key []byte) bool { ok, err := dsa.DB.Has(key) if err != nil { @@ -35,7 +35,7 @@ func (dsa Store) Has(key []byte) bool { return ok } -// Set wraps the underlying DB's Set method panicing on error. +// Set wraps the underlying DB's Set method panicking on error. func (dsa Store) Set(key, value []byte) { types.AssertValidKey(key) types.AssertValidValue(value) @@ -44,14 +44,14 @@ func (dsa Store) Set(key, value []byte) { } } -// Delete wraps the underlying DB's Delete method panicing on error. +// Delete wraps the underlying DB's Delete method panicking on error. func (dsa Store) Delete(key []byte) { if err := dsa.DB.Delete(key); err != nil { panic(err) } } -// Iterator wraps the underlying DB's Iterator method panicing on error. +// Iterator wraps the underlying DB's Iterator method panicking on error. func (dsa Store) Iterator(start, end []byte) types.Iterator { iter, err := dsa.DB.Iterator(start, end) if err != nil { @@ -61,7 +61,7 @@ func (dsa Store) Iterator(start, end []byte) types.Iterator { return iter } -// ReverseIterator wraps the underlying DB's ReverseIterator method panicing on error. +// ReverseIterator wraps the underlying DB's ReverseIterator method panicking on error. func (dsa Store) ReverseIterator(start, end []byte) types.Iterator { iter, err := dsa.DB.ReverseIterator(start, end) if err != nil { diff --git a/store/iavl/store.go b/store/iavl/store.go index 7bdcb1df91..49cc4671da 100644 --- a/store/iavl/store.go +++ b/store/iavl/store.go @@ -223,7 +223,7 @@ func (st *Store) Delete(key []byte) { } } -// DeleteVersionsTo deletes versions upto the given version from the MutableTree. An error +// DeleteVersionsTo deletes versions up to the given version from the MutableTree. An error // is returned if any single version is invalid or the delete fails. All writes // happen in a single batch with a single commit. func (st *Store) DeleteVersionsTo(version int64) error { diff --git a/store/internal/conv/doc.go b/store/internal/conv/doc.go index 1c86f5c144..4b45d1ab53 100644 --- a/store/internal/conv/doc.go +++ b/store/internal/conv/doc.go @@ -1,2 +1,2 @@ -// Package conv provides internal functions for convertions and data manipulation +// Package conv provides internal functions for conversions and data manipulation package conv diff --git a/store/prefix/store.go b/store/prefix/store.go index 32b9e8247e..62f451fa43 100644 --- a/store/prefix/store.go +++ b/store/prefix/store.go @@ -14,7 +14,7 @@ var _ types.KVStore = Store{} // Store is similar with cometbft/cometbft/libs/db/prefix_db // both gives access only to the limited subset of the store -// for convinience or safety +// for convenience or safety type Store struct { parent types.KVStore prefix []byte diff --git a/store/prefix/store_test.go b/store/prefix/store_test.go index 7388357704..01022aa7d2 100644 --- a/store/prefix/store_test.go +++ b/store/prefix/store_test.go @@ -250,7 +250,7 @@ func mockStoreWithStuff() types.KVStore { store.Set(bz("key3"), bz("value3")) store.Set(bz("something"), bz("else")) store.Set(bz("k"), bz("val")) - store.Set(bz("ke"), bz("valu")) + store.Set(bz("ke"), bz("value")) store.Set(bz("kee"), bz("valuu")) return store } diff --git a/store/pruning/manager.go b/store/pruning/manager.go index 9a99e49151..eb4eae538b 100644 --- a/store/pruning/manager.go +++ b/store/pruning/manager.go @@ -43,7 +43,7 @@ func (e *NegativeHeightsError) Error() string { var pruneSnapshotHeightsKey = []byte("s/prunesnapshotheights") // NewManager returns a new Manager with the given db and logger. -// The retuned manager uses a pruning strategy of "nothing" which +// The returned manager uses a pruning strategy of "nothing" which // keeps all heights. Users of the Manager may change the strategy // by calling SetOptions. func NewManager(db dbm.DB, logger log.Logger) *Manager { @@ -99,7 +99,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 { return 0 @@ -128,7 +128,7 @@ func (m *Manager) GetPruningHeight(height int64) int64 { } // the snapshot `m.pruneSnapshotHeights[0]` is already operated, - // so we can prune upto `m.pruneSnapshotHeights[0] + int64(m.snapshotInterval) - 1` + // so we can prune up to `m.pruneSnapshotHeights[0] + int64(m.snapshotInterval) - 1` snHeight := m.pruneSnapshotHeights[0] + int64(m.snapshotInterval) - 1 if snHeight < pruneHeight { return snHeight diff --git a/store/rootmulti/store.go b/store/rootmulti/store.go index 5e408f4c3f..ad02c5521e 100644 --- a/store/rootmulti/store.go +++ b/store/rootmulti/store.go @@ -670,7 +670,7 @@ func (rs *Store) handlePruning(version int64) error { return rs.PruneStores(pruneHeight) } -// PruneStores prunes all history upto the specific height of the multi store. +// PruneStores prunes all history up to the specific height of the multi store. func (rs *Store) PruneStores(pruningHeight int64) (err error) { if pruningHeight <= 0 { rs.logger.Debug("pruning skipped, height is less than or equal to 0") diff --git a/store/transient/store.go b/store/transient/store.go index 6f393279f5..2794d3d9a1 100644 --- a/store/transient/store.go +++ b/store/transient/store.go @@ -13,7 +13,7 @@ var ( _ types.KVStore = (*Store)(nil) ) -// Store is a wrapper for a MemDB with Commiter implementation +// Store is a wrapper for a MemDB with Committer implementation type Store struct { dbadapter.Store } diff --git a/store/types/gas.go b/store/types/gas.go index baceb7ce25..46e7e4ebd0 100644 --- a/store/types/gas.go +++ b/store/types/gas.go @@ -191,7 +191,7 @@ func (g *infiniteGasMeter) ConsumeGas(amount Gas, descriptor string) { // RefundGas will deduct the given amount from the gas consumed. If the amount is greater than the // gas consumed, the function will panic. // -// Use case: This functionality enables refunding gas to the trasaction or block gas pools so that +// Use case: This functionality enables refunding gas to the transaction or block gas pools so that // EVM-compatible chains can fully support the go-ethereum StateDb interface. // See https://github.com/cosmos/cosmos-sdk/pull/9403 for reference. func (g *infiniteGasMeter) RefundGas(amount Gas, descriptor string) {