reth icon indicating copy to clipboard operation
reth copied to clipboard

Return empty list for post-merge blocks in `BlockchainProvider2::ommers`

Open Rjected opened this issue 1 year ago • 0 comments

Since we don't expect to have pre merge blocks in memory, BlockchainProvider2::ommers should make sure that it still returns an empty vec if we are post-merge.

The DB provider does this: https://github.com/paradigmxyz/reth/blob/48d4c798f9a96aa50dfe11b9f45212e33669aec4/crates/storage/provider/src/providers/database/provider.rs#L2006-L2015

Meaning, with the current implementation, BlockchainProvider2::ommers will return None for in-memory blocks when the user provides a hash, since it won't be able to find the corresponding block number.

Rjected avatar Aug 07 '24 16:08 Rjected