Skip to content

Commit

Permalink
SDK 47+ unsafe-reset w/ backwards compatibility (#736) (#755)
Browse files Browse the repository at this point in the history
(cherry picked from commit 482dee8)

Co-authored-by: Reece Williams <[email protected]>
  • Loading branch information
mergify[bot] and Reecepbcups authored Sep 7, 2023
1 parent 64a7179 commit c37fe18
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 @@ -1098,7 +1098,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 c37fe18

Please sign in to comment.