Skip to content

Commit

Permalink
max_fee_per_gas should be set to None for old runtimes
Browse files Browse the repository at this point in the history
  • Loading branch information
librelois committed Apr 29, 2024
1 parent e7fccf9 commit 53eba3e
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions client/rpc/src/eth/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,7 @@ where
let details = fee_details(gas_price, max_fee_per_gas, max_priority_fee_per_gas)?;
(
details.gas_price,
// Old runtimes require max_fee_per_gas to be None for non transactional calls.
if details.max_fee_per_gas == Some(U256::zero()) {
None
} else {
details.max_fee_per_gas
},
details.max_fee_per_gas,
details.max_priority_fee_per_gas,
)
};
Expand Down Expand Up @@ -1051,7 +1046,8 @@ fn fee_details(
// Default to EIP-1559 transaction
_ => Ok(FeeDetails {
gas_price: None,
max_fee_per_gas: Some(U256::zero()),
// Old runtimes require max_fee_per_gas to be None for non transactional calls.
max_fee_per_gas: None,
max_priority_fee_per_gas: Some(U256::zero()),
fee_cap: U256::zero(),
}),
Expand Down

0 comments on commit 53eba3e

Please sign in to comment.