Skip to content

Commit

Permalink
fix: block numbers are u64
Browse files Browse the repository at this point in the history
  • Loading branch information
onbjerg committed Nov 21, 2023
1 parent 67a22f5 commit b5c97e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/evm/core/src/fork/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ pub async fn environment<P: TempProvider>(
origin: Address,
) -> eyre::Result<(Env, Block)> {
let block_number = if let Some(pin_block) = pin_block {
U64::from(pin_block)
pin_block
} else {
provider.get_block_number().await.wrap_err("Failed to get latest block number")?
};
let (fork_gas_price, rpc_chain_id, block) = tokio::try_join!(
provider.get_gas_price(),
provider.get_chain_id(),
provider.get_block_by_number(BlockNumberOrTag::Number(block_number.to()), false)
provider.get_block_by_number(BlockNumberOrTag::Number(block_number), false)
)?;
let block = if let Some(block) = block {
block
Expand Down

0 comments on commit b5c97e8

Please sign in to comment.