Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
hieuvubk committed Aug 1, 2024
1 parent d142e3b commit f8061a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
11 changes: 3 additions & 8 deletions server/v2/store/snapshot.go
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
package store

import (
"archive/tar"
"bytes"
"compress/gzip"
"errors"
"fmt"
"io"
"os"
"path/filepath"
"reflect"

Check notice

Code scanning / CodeQL

Sensitive package import Note

Certain system packages contain functions which may be a possible source of non-determinism
"strconv"

"github.com/spf13/cobra"
"github.com/spf13/viper"

"archive/tar"
"compress/gzip"

"reflect"

"cosmossdk.io/log"
serverv2 "cosmossdk.io/server/v2"
storev2 "cosmossdk.io/store/v2"
Expand Down Expand Up @@ -286,9 +284,6 @@ func (s *StoreComponent[T]) LoadArchiveCmd() *cobra.Command {

var snapshot types.Snapshot
tr := tar.NewReader(reader)
if err != nil {
return fmt.Errorf("failed to create tar reader: %w", err)
}

hdr, err := tr.Next()
if err != nil {
Expand Down
8 changes: 4 additions & 4 deletions simapp/v2/simdv2/cmd/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ func initRootCmd[T transaction.Tx](

// Add RestoreSnapshotCmd separately cause need appCreator
for _, cmd := range rootCmd.Commands() {
if cmd.Use == storeComponent.Name() {
cmd.AddCommand(storeComponent.RestoreSnapshotCmd(newApp))
if cmd.Use == storeComponent.Name() {
cmd.AddCommand(storeComponent.RestoreSnapshotCmd(newApp))
break
}
}
}
}
}

// genesisCommand builds genesis-related `simd genesis` command. Users may provide application specific commands as a parameter
Expand Down

0 comments on commit f8061a8

Please sign in to comment.