From 3fa3e06f5f7b2b8018ec1a082aa346b3b63badb7 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 18 Dec 2023 09:54:37 +0000 Subject: [PATCH] fix(x/auth): remove misleading gas wanted value from tx simulation failure response (backport #18772) (#18775) Co-authored-by: yihuang Co-authored-by: Julien Robert --- CHANGELOG.md | 1 + x/auth/tx/service.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f850ac60ca..4e183a9544 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Improvements * (x/gov) [#18707](https://github.com/cosmos/cosmos-sdk/pull/18707) Improve genesis validation. +* (x/auth/tx) [#18772](https://github.com/cosmos/cosmos-sdk/pull/18772) Remove misleading gas wanted from tx simulation failure log. ## [v0.50.2](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.2) - 2023-12-11 diff --git a/x/auth/tx/service.go b/x/auth/tx/service.go index 9f4d56a931..dd66777095 100644 --- a/x/auth/tx/service.go +++ b/x/auth/tx/service.go @@ -97,7 +97,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{