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 cosmos#18772) (cosmos#18776)

Co-authored-by: yihuang <huang@crypto.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
  • Loading branch information
3 people authored and MSalopek committed Feb 27, 2024
1 parent 5b3a40d commit 611fb6a
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 @@ -101,6 +101,7 @@ during the [Oak Security audit of SDK 0.47](https://github.com/oak-security/audi

* (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 611fb6a

Please sign in to comment.