Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(x/auth): remove misleading gas wanted value from tx simulation failure response #18772

Merged
merged 3 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (crypto/keys) [#18026](https://github.com/cosmos/cosmos-sdk/pull/18026) Made public key generation constant time on `secp256k1`
* (crypto | x/auth) [#14372](https://github.com/cosmos/cosmos-sdk/pull/18194) Key checks on signatures antehandle.
* (staking) [#18506](https://github.com/cosmos/cosmos-sdk/pull/18506) Detect the length of the ed25519 pubkey in CreateValidator to prevent panic.
* (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 @@ -98,7 +98,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)
yihuang marked this conversation as resolved.
Show resolved Hide resolved
}

return &txtypes.SimulateResponse{
Expand Down
Loading