Skip to content

Commit 969ba07

Browse files
committed
Fix lint
1 parent aeda4fb commit 969ba07

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

ante/evm/mono_decorator.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,8 @@ func (md MonoDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, ne
265265
return ctx, err
266266
}
267267

268-
if blockTxIndex := ctx.TxIndex(); blockTxIndex >= 0 {
269-
EmitTxHashEvent(ctx, ethMsg, uint64(blockTxIndex))
270-
}
268+
// Emit event unconditionally - ctx.TxIndex() will be valid during block execution
269+
EmitTxHashEvent(ctx, ethMsg, uint64(ctx.TxIndex())) // #nosec G115 -- no overlfow here
271270

272271
if err := CheckTxFee(txFeeInfo, decUtils.TxFee, decUtils.TxGasLimit); err != nil {
273272
return ctx, err

rpc/backend/comet_to_eth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ func (b *Backend) ReceiptsFromCometBlock(
296296
// transaction corresponding to this receipt.
297297
BlockHash: blockHash,
298298
BlockNumber: big.NewInt(resBlock.Block.Height),
299-
TransactionIndex: uint(txResult.EthTxIndex), // #nosec G115 -- checked for int overflow already
299+
TransactionIndex: uint(i), // #nosec G115 -- no overflow here
300300
}
301301

302302
receipts[i] = receipt

0 commit comments

Comments
 (0)