From 39042281a0fafa67633645575788663bd514f222 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 9 May 2024 13:23:31 +0000 Subject: [PATCH] fix: allow tx decoding to fail in GetBlockWithTxs (backport #20323) (#20329) Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com> Co-authored-by: marbar3778 --- x/auth/tx/service.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/auth/tx/service.go b/x/auth/tx/service.go index dd66777095d..a96ac8cae0b 100644 --- a/x/auth/tx/service.go +++ b/x/auth/tx/service.go @@ -195,13 +195,13 @@ func (s txServer) GetBlockWithTxs(ctx context.Context, req *txtypes.GetBlockWith if req.Pagination != nil && req.Pagination.Reverse { for i, count := offset, uint64(0); i > 0 && count != limit; i, count = i-1, count+1 { if err = decodeTxAt(i); err != nil { - return nil, err + sdkCtx.Logger().Error("failed to decode tx", "error", err) } } } else { for i, count := offset, uint64(0); i < blockTxsLn && count != limit; i, count = i+1, count+1 { if err = decodeTxAt(i); err != nil { - return nil, err + sdkCtx.Logger().Error("failed to decode tx", "error", err) } } }