Skip to content

Commit

Permalink
fix: allow tx decoding to fail in GetBlockWithTxs
Browse files Browse the repository at this point in the history
  • Loading branch information
facundomedica committed May 8, 2024
1 parent 83c4b9b commit 4120d92
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 @@ -186,13 +186,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 4120d92

Please sign in to comment.