From b8a9c6a3d9baa9e44f9d3cab1f083a2d78ab95aa Mon Sep 17 00:00:00 2001 From: Nguyen Thanh Nhan Date: Thu, 6 Apr 2023 14:17:32 +0700 Subject: [PATCH] Update `ExportState` (#475) * update exportstate * add space * concatenate stdout and stderr --- chain/cosmos/chain_node.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chain/cosmos/chain_node.go b/chain/cosmos/chain_node.go index 185702814..e0427aa10 100644 --- a/chain/cosmos/chain_node.go +++ b/chain/cosmos/chain_node.go @@ -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 {