mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-28 00:28:20 -05:00
fix: make RequestsProvider method aware of in-memory state (#10252)
This commit is contained in:
committed by
GitHub
parent
ac3d62ba02
commit
91c1df379d
@@ -832,7 +832,15 @@ where
|
||||
id: BlockHashOrNumber,
|
||||
timestamp: u64,
|
||||
) -> ProviderResult<Option<reth_primitives::Requests>> {
|
||||
self.database.requests_by_block(id, timestamp)
|
||||
if !self.database.chain_spec().is_prague_active_at_timestamp(timestamp) {
|
||||
return Ok(None)
|
||||
}
|
||||
let Some(number) = self.convert_hash_or_number(id)? else { return Ok(None) };
|
||||
if let Some(block) = self.canonical_in_memory_state.state_by_number(number) {
|
||||
Ok(block.block().block().requests.clone())
|
||||
} else {
|
||||
self.database.requests_by_block(id, timestamp)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user