diff --git a/rpc/types/utils.go b/rpc/types/utils.go index 0aa06a9f..94b0fc15 100644 --- a/rpc/types/utils.go +++ b/rpc/types/utils.go @@ -201,7 +201,7 @@ func GetBlockCumulativeGas(cdc *codec.Codec, block *tmtypes.Block, idx int) uint var gasUsed uint64 txDecoder := evmtypes.TxDecoder(cdc) - for i := 0; i < idx && i < len(block.Txs[i]); i++ { + for i := 0; i < idx && i < len(block.Txs); i++ { txi, err := txDecoder(block.Txs[i]) if err != nil { continue