Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospb19-cw committed Aug 1, 2024
1 parent 2316894 commit 7a10ca4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/eth/storage/rocks/rocks_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,13 +370,12 @@ impl RocksStorageState {
BlockFilter::Latest | BlockFilter::Pending => self.blocks_by_number.last_value(),
BlockFilter::Earliest => self.blocks_by_number.first_value(),
BlockFilter::Number(block_number) => self.blocks_by_number.get(&(*block_number).into()),
BlockFilter::Hash(block_hash) => {
BlockFilter::Hash(block_hash) =>
if let Some(block_number) = self.blocks_by_hash.get(&(*block_hash).into())? {
self.blocks_by_number.get(&block_number)
} else {
Ok(None)
}
}
},
};

block.map(|block_option| block_option.map(|block| block.into_inner().into()))
Expand Down

0 comments on commit 7a10ca4

Please sign in to comment.