From a44f2467e710237e980ba07aa1fd350838fbbde0 Mon Sep 17 00:00:00 2001 From: Cyson Date: Fri, 21 Apr 2023 10:49:36 -0700 Subject: [PATCH] Add checkTxResponse log to RPCResponse --- types/result.go | 2 ++ types/result_test.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/types/result.go b/types/result.go index d32c7d7f8..146b598bb 100644 --- a/types/result.go +++ b/types/result.go @@ -113,6 +113,7 @@ func newTxResponseCheckTx(res *ctypes.ResultBroadcastTxCommit) *TxResponse { Codespace: res.CheckTx.Codespace, Code: res.CheckTx.Code, Data: strings.ToUpper(hex.EncodeToString(res.CheckTx.Data)), + RawLog: res.CheckTx.Log, GasWanted: res.CheckTx.GasWanted, } } @@ -154,6 +155,7 @@ func NewResponseFormatBroadcastTx(res *ctypes.ResultBroadcastTx) *TxResponse { Code: res.Code, Codespace: res.Codespace, Data: res.Data.String(), + RawLog: res.Log, TxHash: res.Hash.String(), } } diff --git a/types/result_test.go b/types/result_test.go index 3d6f6eb2c..949246a2f 100644 --- a/types/result_test.go +++ b/types/result_test.go @@ -150,6 +150,7 @@ func (s *resultTestSuite) TestResponseFormatBroadcastTxCommit() { Data: nil, GasWanted: 99, Codespace: "codespace", + Log: "rawlog", }, } deliverTxResult := &ctypes.ResultBroadcastTxCommit{ @@ -183,6 +184,7 @@ func (s *resultTestSuite) TestResponseFormatBroadcastTxCommit() { Codespace: "codespace", Code: 90, Data: "", + RawLog: "rawlog", GasWanted: 99, } deliverWant := &sdk.TxResponse{