Skip to content

Commit

Permalink
Merge pull request #69 from skalenetwork/add-monitoring
Browse files Browse the repository at this point in the history
Gas price fix for testnets
  • Loading branch information
dmytrotkk authored Jul 9, 2024
2 parents 60e7188 + ccf2b33 commit 41b1e88
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 41b1e88

Please sign in to comment.