Skip to content

Commit 91f1c7a

Browse files
committed
max_fee_per_gas should be set to None for old runtimes
1 parent 2c05f9d commit 91f1c7a

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

client/rpc/src/eth/execute.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -222,12 +222,7 @@ where
222222
let details = fee_details(gas_price, max_fee_per_gas, max_priority_fee_per_gas)?;
223223
(
224224
details.gas_price,
225-
// Old runtimes require max_fee_per_gas to be None for non transactional calls.
226-
if details.max_fee_per_gas == Some(U256::zero()) {
227-
None
228-
} else {
229-
details.max_fee_per_gas
230-
},
225+
details.max_fee_per_gas,
231226
details.max_priority_fee_per_gas,
232227
)
233228
};
@@ -1171,7 +1166,8 @@ fn fee_details(
11711166
// Default to EIP-1559 transaction
11721167
_ => Ok(FeeDetails {
11731168
gas_price: None,
1174-
max_fee_per_gas: Some(U256::zero()),
1169+
// Old runtimes require max_fee_per_gas to be None for non transactional calls.
1170+
max_fee_per_gas: None,
11751171
max_priority_fee_per_gas: Some(U256::zero()),
11761172
fee_cap: U256::zero(),
11771173
}),

0 commit comments

Comments
 (0)