Skip to content

Commit

Permalink
SDK 47+ unsafe-reset w/ backwards compatibility (#736)
Browse files Browse the repository at this point in the history
(cherry picked from commit 482dee8)
  • Loading branch information
Reecepbcups authored and mergify[bot] committed Sep 7, 2023
1 parent 9fdddb2 commit 7e40bf9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion chain/cosmos/chain_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,14 @@ func (tn *ChainNode) UnsafeResetAll(ctx context.Context) error {
tn.lock.Lock()
defer tn.lock.Unlock()

_, _, err := tn.ExecBin(ctx, "unsafe-reset-all")
command := []string{tn.Chain.Config().Bin}
if tn.Chain.Config().UsingNewGenesisCommand {
command = append(command, "comet")
}

command = append(command, "unsafe-reset-all", "--home", tn.HomeDir())

_, _, err := tn.Exec(ctx, command, nil)
return err
}

Expand Down

0 comments on commit 7e40bf9

Please sign in to comment.