chore: fix all linting (#24101)
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user