Skip to content

Commit

Permalink
Fix root dir for tendermint reindex command
Browse files Browse the repository at this point in the history
  • Loading branch information
yzang2019 committed Mar 13, 2024
1 parent 3cc1293 commit 445bf26
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/tendermint/commands/reindex_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/tendermint/tendermint/internal/state/indexer/sink/kv"
"github.com/tendermint/tendermint/internal/state/indexer/sink/psql"
"github.com/tendermint/tendermint/internal/store"
"github.com/tendermint/tendermint/libs/cli"
"github.com/tendermint/tendermint/libs/log"
"github.com/tendermint/tendermint/libs/os"
"github.com/tendermint/tendermint/rpc/coretypes"
Expand Down Expand Up @@ -52,6 +53,8 @@ either or both arguments.
tendermint reindex-event --start-height 2 --end-height 10
`,
RunE: func(cmd *cobra.Command, args []string) error {
home, err := cmd.Flags().GetString(cli.HomeFlag)
conf.RootDir = home
bs, ss, err := loadStateAndBlockStore(conf)
if err != nil {
return fmt.Errorf("%s: %w", reindexFailed, err)
Expand Down
1 change: 1 addition & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ func DefaultBaseConfig() BaseConfig {
FilterPeers: false,
DBBackend: "goleveldb",
DBPath: "data",
RootDir: "/root/.sei",
}
}

Expand Down

0 comments on commit 445bf26

Please sign in to comment.