feat: use in memory state for header_td (#10189)

This commit is contained in:
Dan Cline
2024-08-07 17:59:02 -04:00
committed by GitHub
parent 0bf35ab20f
commit 9082c19f31

View File

@ -194,7 +194,11 @@ where
}
fn header_td(&self, hash: &BlockHash) -> ProviderResult<Option<U256>> {
self.database.header_td(hash)
if let Some(num) = self.block_number(*hash)? {
self.header_td_by_number(num)
} else {
Ok(None)
}
}
fn header_td_by_number(&self, number: BlockNumber) -> ProviderResult<Option<U256>> {