diff --git a/chain/cosmos/chain_node.go b/chain/cosmos/chain_node.go index 8f4a1564a..3e6ca36bc 100644 --- a/chain/cosmos/chain_node.go +++ b/chain/cosmos/chain_node.go @@ -922,12 +922,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 {