Skip to content

Commit

Permalink
Update ExportState (strangelove-ventures#475)
Browse files Browse the repository at this point in the history
* update exportstate

* add space

* concatenate stdout and stderr
  • Loading branch information
ThanhNhann authored and aljo242 committed Apr 10, 2023
1 parent 45caee8 commit b8a9c6a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions chain/cosmos/chain_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -920,12 +920,12 @@ func (tn *ChainNode) ExportState(ctx context.Context, height int64) (string, err
tn.lock.Lock()
defer tn.lock.Unlock()

_, stderr, err := tn.ExecBin(ctx, "export", "--height", fmt.Sprint(height))
stdout, stderr, err := tn.ExecBin(ctx, "export", "--height", fmt.Sprint(height))
if err != nil {
return "", err
}
// output comes to stderr for some reason
return string(stderr), nil
// output comes to stderr on older versions
return string(stdout) + string(stderr), nil
}

func (tn *ChainNode) UnsafeResetAll(ctx context.Context) error {
Expand Down

0 comments on commit b8a9c6a

Please sign in to comment.