Skip to content

Commit

Permalink
refactor: remove unnecessary trait casts
Browse files Browse the repository at this point in the history
  • Loading branch information
dinhani-cw committed Feb 22, 2024
1 parent d26783b commit cc858c2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/eth/storage/stratus_storage.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use std::ops::Deref;
use std::sync::Arc;
use std::time::Instant;

Expand Down Expand Up @@ -60,7 +59,7 @@ impl StratusStorage {
/// Checks if the transaction execution conflicts with the current storage state.
pub async fn check_conflicts(&self, execution: &Execution) -> anyhow::Result<Option<ExecutionConflicts>> {
let start = Instant::now();
let result = TemporaryStorage::check_conflicts(self.temp.deref(), execution).await;
let result = self.temp.check_conflicts(execution).await;
metrics::inc_storage_check_conflicts(start.elapsed(), result.as_ref().is_ok_and(|v| v.is_some()), result.is_ok());
result
}
Expand Down Expand Up @@ -186,7 +185,7 @@ impl StratusStorage {
match block_selection {
BlockSelection::Latest => Ok(StoragePointInTime::Present),
BlockSelection::Number(number) => {
let current_block = PermanentStorage::read_current_block_number(self.perm.deref()).await?;
let current_block = self.perm.read_current_block_number().await?;
if number <= &current_block {
Ok(StoragePointInTime::Past(*number))
} else {
Expand Down

0 comments on commit cc858c2

Please sign in to comment.