Skip to content

Commit e33884f

Browse files
fix: allow tx decoding to fail in GetBlockWithTxs (#20323)
1 parent 83c4b9b commit e33884f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

x/auth/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,4 @@ Ref: https://keepachangelog.com/en/1.0.0/
6363
* [#19148](https://github.com/cosmos/cosmos-sdk/pull/19148) Checks the consumed gas for verifying a multisig pubKey signature during simulation.
6464
* [#19239](https://github.com/cosmos/cosmos-sdk/pull/19239) Sets from flag in multi-sign command to avoid no key name provided error.
6565
* [#19099](https://github.com/cosmos/cosmos-sdk/pull/19099) `verifyIsOnCurve` now checks if we are simulating to avoid malformed public key error.
66+
* [#20323](https://github.com/cosmos/cosmos-sdk/pull/20323) Ignore undecodable txs in GetBlocksWithTxs.

x/auth/tx/service.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -186,13 +186,13 @@ func (s txServer) GetBlockWithTxs(ctx context.Context, req *txtypes.GetBlockWith
186186
if req.Pagination != nil && req.Pagination.Reverse {
187187
for i, count := offset, uint64(0); i > 0 && count != limit; i, count = i-1, count+1 {
188188
if err = decodeTxAt(i); err != nil {
189-
return nil, err
189+
sdkCtx.Logger().Error("failed to decode tx", "error", err)
190190
}
191191
}
192192
} else {
193193
for i, count := offset, uint64(0); i < blockTxsLn && count != limit; i, count = i+1, count+1 {
194194
if err = decodeTxAt(i); err != nil {
195-
return nil, err
195+
sdkCtx.Logger().Error("failed to decode tx", "error", err)
196196
}
197197
}
198198
}

0 commit comments

Comments
 (0)