Skip to content

Commit

Permalink
Add checkTxResponse log to RPCResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyson authored and Cyson committed Apr 24, 2023
1 parent 99f0bd1 commit a44f246
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions types/result.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}
Expand Down Expand Up @@ -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(),
}
}
Expand Down
2 changes: 2 additions & 0 deletions types/result_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ func (s *resultTestSuite) TestResponseFormatBroadcastTxCommit() {
Data: nil,
GasWanted: 99,
Codespace: "codespace",
Log: "rawlog",
},
}
deliverTxResult := &ctypes.ResultBroadcastTxCommit{
Expand Down Expand Up @@ -183,6 +184,7 @@ func (s *resultTestSuite) TestResponseFormatBroadcastTxCommit() {
Codespace: "codespace",
Code: 90,
Data: "",
RawLog: "rawlog",
GasWanted: 99,
}
deliverWant := &sdk.TxResponse{
Expand Down

0 comments on commit a44f246

Please sign in to comment.