@@ -8,6 +8,7 @@ use op_alloy_consensus::{OpBlock, OpTxEnvelope};
88use op_alloy_network:: { Optimism , TransactionResponse } ;
99use op_alloy_rpc_types:: { OpTransactionReceipt , Transaction } ;
1010use reth:: revm:: db:: { BundleState , Cache } ;
11+ use reth_evm:: op_revm:: L1BlockInfo ;
1112use reth_optimism_primitives:: OpTransactionSigned ;
1213use reth_rpc_eth_api:: RpcBlock ;
1314use tokio:: sync:: broadcast;
@@ -37,6 +38,8 @@ pub struct UnsealedBlock {
3738 /// Cumulative blob gas used across all blob-carrying transactions in the block.
3839 pub cumulative_blob_gas_used : u64 ,
3940 pub is_prague : bool ,
41+ // Current unsealed block l1 block info
42+ pub l1_block_info : Option < L1BlockInfo > ,
4043
4144 transaction_count : HashMap < Address , U256 > ,
4245 transactions : Vec < Transaction > ,
@@ -71,6 +74,7 @@ impl UnsealedBlock {
7174 new_block_sender,
7275 db_cache : Default :: default ( ) ,
7376 bundle_state : Default :: default ( ) ,
77+ l1_block_info : None ,
7478 }
7579 }
7680
@@ -226,6 +230,12 @@ impl UnsealedBlock {
226230 self
227231 }
228232
233+ /// Attach/replace the l1 block info.
234+ pub fn with_l1_block_info ( mut self , l1_block_info : L1BlockInfo ) -> Self {
235+ self . l1_block_info = Some ( l1_block_info) ;
236+ self
237+ }
238+
229239 /// Returns the database cache.
230240 pub fn get_db_cache ( & self ) -> Cache {
231241 self . db_cache . clone ( )
@@ -255,6 +265,7 @@ impl UnsealedBlock {
255265 new_block_sender : self . new_block_sender . clone ( ) ,
256266 transaction_receipts : self . transaction_receipts . clone ( ) ,
257267 bundle_state : self . bundle_state . clone ( ) ,
268+ l1_block_info : self . l1_block_info . clone ( ) ,
258269 }
259270 }
260271
0 commit comments