Skip to content

Commit

Permalink
chore: Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dudong2 committed Aug 31, 2024
1 parent 62e533e commit 45df413
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rpc/backend/tracing.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ func (b *Backend) TraceTransaction(hash common.Hash, config *evmtypes.TraceConfi
}

// check tx index is not out of bound
if uint32(len(blk.Block.Txs)) < transaction.TxIndex { //#nosec G115
txsLen := uint32(len(blk.Block.Txs)) // #nosec G115
if txsLen < transaction.TxIndex {
b.logger.Debug("tx index out of bounds", "index", transaction.TxIndex, "hash", hash.String(), "height", blk.Block.Height)
return nil, fmt.Errorf("transaction not included in block %v", blk.Block.Height)
}
Expand Down

0 comments on commit 45df413

Please sign in to comment.