chore: fix all linting (#24101)

This commit is contained in:
Alex | Interchain Labs
2025-03-21 15:04:36 -07:00
committed by GitHub
parent b7fb7f4858
commit 7fd79df4e1
329 changed files with 1282 additions and 1251 deletions
-2
View File
@@ -141,7 +141,6 @@ func TestMultistoreSnapshot_Checksum(t *testing.T) {
}},
}
for _, tc := range testcases {
tc := tc
t.Run(fmt.Sprintf("Format %v", tc.format), func(t *testing.T) {
ch := make(chan io.ReadCloser)
go func() {
@@ -176,7 +175,6 @@ func TestMultistoreSnapshot_Errors(t *testing.T) {
"unknown height": {9, nil},
}
for name, tc := range testcases {
tc := tc
t.Run(name, func(t *testing.T) {
err := store.Snapshot(tc.height, nil)
require.Error(t, err)
+2 -3
View File
@@ -873,7 +873,7 @@ func (rs *Store) Snapshot(height uint64, protoWriter protoio.Writer) error {
nodeCount := 0
for {
node, err := exporter.Next()
if err == iavltree.ErrorExportDone {
if errors.Is(err, iavltree.ErrorExportDone) {
rs.logger.Debug("snapshot Done", "store", store.name, "nodeCount", nodeCount)
break
} else if err != nil {
@@ -897,7 +897,6 @@ func (rs *Store) Snapshot(height uint64, protoWriter protoio.Writer) error {
return nil
}()
if err != nil {
return err
}
@@ -920,7 +919,7 @@ loop:
for {
snapshotItem = snapshottypes.SnapshotItem{}
err := protoReader.ReadMsg(&snapshotItem)
if err == io.EOF {
if errors.Is(err, io.EOF) {
break
} else if err != nil {
return snapshottypes.SnapshotItem{}, errorsmod.Wrap(err, "invalid protobuf message")
-2
View File
@@ -520,8 +520,6 @@ func TestMultiStore_Pruning(t *testing.T) {
}
for _, tc := range testCases {
tc := tc
t.Run(tc.name, func(t *testing.T) {
db := dbm.NewMemDB()
ms := newMultiStoreWithMounts(db, tc.po)