Skip to content

Commit

Permalink
Problem: base_fee_per_gas and base_fee_per_blob_gas have different le…
Browse files Browse the repository at this point in the history
…nghts errors (#80)
  • Loading branch information
thomas-nguy authored and JayT106 committed Oct 24, 2024
1 parent 0d78228 commit 8666a36
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions core/lib/eth_client/src/clients/http/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ where
let chunk_end = (chunk_start + FEE_HISTORY_MAX_REQUEST_CHUNK).min(upto_block);
let chunk_size = chunk_end - chunk_start;

let fee_history = client
let mut fee_history = client
.fee_history(
U64::from(chunk_size),
web3::BlockNumber::from(chunk_end),
Expand All @@ -329,11 +329,8 @@ where
// prior to EIP-4844.
// https://ethereum.github.io/execution-apis/api-documentation/
if fee_history.base_fee_per_gas.len() != fee_history.base_fee_per_blob_gas.len() {
tracing::error!(
"base_fee_per_gas and base_fee_per_blob_gas have different lengths: {} and {}",
fee_history.base_fee_per_gas.len(),
fee_history.base_fee_per_blob_gas.len()
);
fee_history.base_fee_per_blob_gas =
vec![U256::from(0); fee_history.base_fee_per_gas.len()];
}

for (base, blob) in fee_history
Expand Down

0 comments on commit 8666a36

Please sign in to comment.