Skip to content

Commit

Permalink
fix: allow tx decoding to fail in GetBlockWithTxs (cosmos#20323)
Browse files Browse the repository at this point in the history
  • Loading branch information
facundomedica authored and roy-dydx committed May 17, 2024
1 parent dd11639 commit 4ecb5d5
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 4ecb5d5

Please sign in to comment.