mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: add canonical_headers_range (#1795)
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
This commit is contained in:
@ -63,6 +63,7 @@ impl<DB: StateProvider> DatabaseRef for State<DB> {
|
||||
}
|
||||
|
||||
fn block_hash(&self, number: U256) -> Result<H256, Self::Error> {
|
||||
Ok(self.0.block_hash(number)?.unwrap_or_default())
|
||||
// Note: this unwrap is potentially unsafe
|
||||
Ok(self.0.block_hash(number.try_into().unwrap())?.unwrap_or_default())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user