Skip to content

Commit

Permalink
SDK 47+ unsafe-reset w/ backwards compatibility (#736)
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups authored Sep 7, 2023
1 parent 4f5602b commit 482dee8
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 @@ -1097,7 +1097,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 482dee8

Please sign in to comment.