-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
A-rpcRelated to the RPC implementationRelated to the RPC implementationC-enhancementNew feature or requestNew feature or requestD-good-first-issueNice and easy! A great choice to get startedNice and easy! A great choice to get started
Description
Describe the feature
total difficulty has been deprecated ethereum/execution-apis#570
and we can start removing it, starting with rpc:
reth/crates/rpc/rpc-eth-api/src/helpers/block.rs
Lines 67 to 76 in 1602bae
let mut total_difficulty = self | |
.provider() | |
.header_td_by_number(block.number()) | |
.map_err(Self::Error::from_eth_err)?; | |
if total_difficulty.is_none() { | |
// if we failed to find td after we successfully loaded the block, try again using | |
// the hash this only matters if the chain is currently transitioning the merge block and there's a reorg: <https://github.com/paradigmxyz/reth/issues/10941> | |
total_difficulty = | |
self.provider().header_td(&block.hash()).map_err(Self::Error::from_eth_err)?; | |
} |
TODO
- simplify rpc block functions by removing total difficulty
Additional context
No response
Metadata
Metadata
Assignees
Labels
A-rpcRelated to the RPC implementationRelated to the RPC implementationC-enhancementNew feature or requestNew feature or requestD-good-first-issueNice and easy! A great choice to get startedNice and easy! A great choice to get started
Type
Projects
Status
Done