Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

Commit

Permalink
Use into() to transform U64 to BlockHashOrNumber (#1000)
Browse files Browse the repository at this point in the history
Use into to transform U64 to BlockHashOrNumber
  • Loading branch information
tcoratger authored Apr 22, 2024
1 parent 00c9e9e commit 79076c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/eth_provider/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ where
number_or_tag: BlockNumberOrTag,
) -> EthProviderResult<Option<U256>> {
let block_number = self.tag_into_block_number(number_or_tag).await?;
let block_exists = self.block_exists(block_number.to::<u64>().into()).await?;
let block_exists = self.block_exists(block_number.into()).await?;
if !block_exists {
return Ok(None);
}
Expand Down Expand Up @@ -589,7 +589,7 @@ where
match block_id {
BlockId::Number(maybe_number) => {
let block_number = self.tag_into_block_number(maybe_number).await?;
let block_exists = self.block_exists(block_number.to::<u64>().into()).await?;
let block_exists = self.block_exists(block_number.into()).await?;
if !block_exists {
return Ok(None);
}
Expand Down

0 comments on commit 79076c8

Please sign in to comment.