Skip to content

Commit

Permalink
Hotfix for testnets
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytrotkk committed Jul 8, 2024
1 parent 70f2247 commit b28b571
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions metrics/src/gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ def calc_avg_gas_price():
logger.info(f'Getting historic block gas prices...')
for index in range(GAS_ESTIMATION_ITERATIONS):
block_number = block_number - BLOCK_SAMPLING * index
if (block_number < 0):
break
logger.info(f'Getting block {block_number}...')
block = w3.eth.get_block(block_number)
total_gas_used += block['baseFeePerGas']

Expand Down

0 comments on commit b28b571

Please sign in to comment.