Skip to content

Commit

Permalink
perf(history_by_block_hash): reuse provider instead of creating two (
Browse files Browse the repository at this point in the history
  • Loading branch information
hai-rise authored and emhane committed Dec 13, 2024
1 parent 4d2e33e commit 8c892ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/storage/provider/src/providers/database/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ impl<N: ProviderNodeTypes> ProviderFactory<N> {
.block_number(block_hash)?
.ok_or(ProviderError::BlockHashNotFound(block_hash))?;

let state_provider = self.provider()?.try_into_history_at_block(block_number)?;
let state_provider = provider.try_into_history_at_block(block_number)?;
trace!(target: "providers::db", ?block_number, %block_hash, "Returning historical state provider for block hash");
Ok(state_provider)
}
Expand Down

0 comments on commit 8c892ae

Please sign in to comment.