Skip to content

Commit

Permalink
Handle zero priority fee
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeny-stakewise committed Jul 1, 2024
1 parent 76cd846 commit 537c135
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/common/execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ async def get_high_priority_tx_params() -> TxParams:

max_priority_fee_per_gas = await _calc_high_priority_fee()

# Edge case on chiado
if max_priority_fee_per_gas == Wei(0):
max_priority_fee_per_gas = Wei(1)

# Reference: `_max_fee_per_gas` in web3/_utils/async_transactions.py
block = await execution_client.eth.get_block('latest')
max_fee_per_gas = Wei(max_priority_fee_per_gas + (2 * block['baseFeePerGas']))
Expand Down

0 comments on commit 537c135

Please sign in to comment.