fix bug in function GetBlockCumulativeGas (#663)

This commit is contained in:
Pierre
2020-12-16 07:58:25 -03:00
committed by GitHub
parent cb96bc4ea3
commit 1d084423a8
+1 -1
View File
@@ -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