Skip to content

Commit

Permalink
fix(x/auth): remove misleading gas wanted value from tx simulation fa…
Browse files Browse the repository at this point in the history
…ilure response (backport #18772) (#18776)

Co-authored-by: yihuang <huang@crypto.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
  • Loading branch information
3 people authored Dec 19, 2023
1 parent 6309fa7 commit 371744b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

* (x/gov) [#18707](https://github.com/cosmos/cosmos-sdk/pull/18707) Improve genesis validation.
* (server) [#18478](https://github.com/cosmos/cosmos-sdk/pull/18478) Add command flag to disable colored logs.
* (x/auth/tx) [#18772](https://github.com/cosmos/cosmos-sdk/pull/18772) Remove misleading gas wanted from tx simulation failure log.

### Bug Fixes

Expand Down
2 changes: 1 addition & 1 deletion x/auth/tx/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (s txServer) Simulate(ctx context.Context, req *txtypes.SimulateRequest) (*

gasInfo, result, err := s.simulate(txBytes)
if err != nil {
return nil, status.Errorf(codes.Unknown, "%v With gas wanted: '%d' and gas used: '%d' ", err, gasInfo.GasWanted, gasInfo.GasUsed)
return nil, status.Errorf(codes.Unknown, "%v with gas used: '%d'", err, gasInfo.GasUsed)
}

return &txtypes.SimulateResponse{
Expand Down

0 comments on commit 371744b

Please sign in to comment.