From 00ec23cdbe1b2bef180021e4e4ac569e6f26bcae Mon Sep 17 00:00:00 2001 From: goofylfg <165781272+goofylfg@users.noreply.github.com> Date: Thu, 25 Apr 2024 15:29:09 +0800 Subject: [PATCH] chore: remove repetitive words (#20180) --- store/storage/rocksdb/db_test.go | 2 +- store/storage/sqlite/db_test.go | 2 +- store/storage/storage_test_suite.go | 2 +- types/collections.go | 2 +- types/dec_coin.go | 2 +- types/module/module.go | 2 +- x/auth/ante/unorderedtx/snapshotter_test.go | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/store/storage/rocksdb/db_test.go b/store/storage/rocksdb/db_test.go index 776918bb74..0f2ba8fac0 100644 --- a/store/storage/rocksdb/db_test.go +++ b/store/storage/rocksdb/db_test.go @@ -65,7 +65,7 @@ func TestDatabase_ReverseIterator(t *testing.T) { // seek past domain, which should make the iterator invalid and produce an error require.False(t, iter.Valid()) - // reverse iterator with with a start and end domain + // reverse iterator with a start and end domain iter2, err := db.ReverseIterator(storeKey1, 1, []byte("key010"), []byte("key019")) require.NoError(t, err) diff --git a/store/storage/sqlite/db_test.go b/store/storage/sqlite/db_test.go index 96c50e9b56..403a60220a 100644 --- a/store/storage/sqlite/db_test.go +++ b/store/storage/sqlite/db_test.go @@ -62,7 +62,7 @@ func TestDatabase_ReverseIterator(t *testing.T) { // seek past domain, which should make the iterator invalid and produce an error require.False(t, iter.Valid()) - // reverse iterator with with a start and end domain + // reverse iterator with a start and end domain iter2, err := db.ReverseIterator(storeKey1, 1, []byte("key010"), []byte("key019")) require.NoError(t, err) diff --git a/store/storage/storage_test_suite.go b/store/storage/storage_test_suite.go index 23c93f46c8..b7d748386e 100644 --- a/store/storage/storage_test_suite.go +++ b/store/storage/storage_test_suite.go @@ -273,7 +273,7 @@ func (s *StorageTestSuite) TestDatabase_Iterator() { s.Require().False(itr.Valid()) } - // iterator with with a start and end domain over multiple versions + // iterator with a start and end domain over multiple versions for v := uint64(1); v < 5; v++ { itr2, err := db.Iterator(storeKey1Bytes, v, []byte("key010"), []byte("key019")) s.Require().NoError(err) diff --git a/types/collections.go b/types/collections.go index 5474d19af7..cf7ad0cb22 100644 --- a/types/collections.go +++ b/types/collections.go @@ -255,7 +255,7 @@ var timeSize = len(FormatTimeBytes(time.Time{})) func (timeKeyCodec) Decode(buffer []byte) (int, time.Time, error) { if len(buffer) != timeSize { - return 0, time.Time{}, fmt.Errorf("invalid time buffer buffer size") + return 0, time.Time{}, fmt.Errorf("invalid time buffer size") } t, err := ParseTimeBytes(buffer) if err != nil { diff --git a/types/dec_coin.go b/types/dec_coin.go index 37bcd5b633..9a2a499424 100644 --- a/types/dec_coin.go +++ b/types/dec_coin.go @@ -156,7 +156,7 @@ func (coin DecCoin) IsValid() bool { // DecCoins defines a slice of coins with decimal values type DecCoins []DecCoin -// NewDecCoins constructs a new coin set with with decimal values +// NewDecCoins constructs a new coin set with decimal values // from DecCoins. The provided coins will be sanitized by removing // zero coins and sorting the coin set. A panic will occur if the coin set is not valid. func NewDecCoins(decCoins ...DecCoin) DecCoins { diff --git a/types/module/module.go b/types/module/module.go index 552cdcb58b..d19e66f3e5 100644 --- a/types/module/module.go +++ b/types/module/module.go @@ -54,7 +54,7 @@ type AppModuleBasic interface { // AppModule is the form for an application module. Most of // its functionality has been moved to extension interfaces. -// Deprecated: use appmodule.AppModule with a combination of extension interfaces interfaces instead. +// Deprecated: use appmodule.AppModule with a combination of extension interfaces instead. type AppModule interface { HasName diff --git a/x/auth/ante/unorderedtx/snapshotter_test.go b/x/auth/ante/unorderedtx/snapshotter_test.go index 1645fbb906..c073cf73f0 100644 --- a/x/auth/ante/unorderedtx/snapshotter_test.go +++ b/x/auth/ante/unorderedtx/snapshotter_test.go @@ -43,7 +43,7 @@ func TestSnapshotter(t *testing.T) { require.NoError(t, err) require.Empty(t, txm2.Size()) - // restore with with height < ttl which should result in all unordered txs synced + // restore with height < ttl which should result in all unordered txs synced txm3 := unorderedtx.NewManager(dataDir) s3 := unorderedtx.NewSnapshotter(txm3) err = s3.RestoreExtension(50, unorderedtx.SnapshotFormat, pr)