mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-08 03:01:12 -04:00
fix(op-reth, rpc): eth_getBlockReceipts err for genesis block in op-reth (#16879)
This commit is contained in:
@@ -40,7 +40,17 @@ where
|
||||
let excess_blob_gas = block.excess_blob_gas();
|
||||
let timestamp = block.timestamp();
|
||||
|
||||
let mut l1_block_info = reth_optimism_evm::extract_l1_info(block.body())?;
|
||||
let mut l1_block_info = match reth_optimism_evm::extract_l1_info(block.body()) {
|
||||
Ok(l1_block_info) => l1_block_info,
|
||||
Err(err) => {
|
||||
// If it is the genesis block (i.e block number is 0), there is no L1 info, so
|
||||
// we return an empty l1_block_info.
|
||||
if block_number == 0 {
|
||||
return Ok(Some(vec![]));
|
||||
}
|
||||
return Err(err.into());
|
||||
}
|
||||
};
|
||||
|
||||
return block
|
||||
.body()
|
||||
|
||||
Reference in New Issue
Block a user