Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
fix bug in function GetBlockCumulativeGas (#663)
Browse files Browse the repository at this point in the history
  • Loading branch information
summerpro authored Dec 16, 2020
1 parent cb96bc4 commit 1d08442
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rpc/types/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1d08442

Please sign in to comment.