Skip to content

Commit

Permalink
fix: allow tx decoding to fail in GetBlockWithTxs (backport #20323) (#…
Browse files Browse the repository at this point in the history
…20329)

Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com>
Co-authored-by: marbar3778 <marbar3778@yahoo.com>
  • Loading branch information
3 people authored May 9, 2024
1 parent 9f8e3a5 commit 3904228
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x/auth/tx/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}
Expand Down

0 comments on commit 3904228

Please sign in to comment.