mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-30 03:01:58 -04:00
perf(rpc): remove redundant block id resolution in debug_trace_block (#23128)
This commit is contained in:
@@ -199,15 +199,9 @@ where
|
||||
block_id: BlockId,
|
||||
opts: GethDebugTracingOptions,
|
||||
) -> Result<Vec<TraceResult>, Eth::Error> {
|
||||
let block_hash = self
|
||||
.provider()
|
||||
.block_hash_for_id(block_id)
|
||||
.map_err(Eth::Error::from_eth_err)?
|
||||
.ok_or(EthApiError::HeaderNotFound(block_id))?;
|
||||
|
||||
let block = self
|
||||
.eth_api()
|
||||
.recovered_block(block_hash.into())
|
||||
.recovered_block(block_id)
|
||||
.await?
|
||||
.ok_or(EthApiError::HeaderNotFound(block_id))?;
|
||||
let evm_env = self.eth_api().evm_env_for_header(block.sealed_block().sealed_header())?;
|
||||
|
||||
Reference in New Issue
Block a user