11use crate :: { cli:: config:: PayloadBuilderConfig , version:: default_extra_data} ;
22use alloy_consensus:: constants:: MAXIMUM_EXTRA_DATA_SIZE ;
3- use alloy_eips:: merge:: SLOT_DURATION ;
3+ use alloy_eips:: { eip1559 :: ETHEREUM_BLOCK_GAS_LIMIT_36M , merge:: SLOT_DURATION } ;
44use clap:: {
55 builder:: { RangedU64ValueParser , TypedValueParser } ,
66 Arg , Args , Command ,
@@ -17,8 +17,12 @@ pub struct PayloadBuilderArgs {
1717 pub extra_data : String ,
1818
1919 /// Target gas limit for built blocks.
20- #[ arg( long = "builder.gaslimit" , value_name = "GAS_LIMIT" ) ]
21- pub gas_limit : Option < u64 > ,
20+ #[ arg(
21+ long = "builder.gaslimit" ,
22+ value_name = "GAS_LIMIT" ,
23+ default_value_t = ETHEREUM_BLOCK_GAS_LIMIT_36M
24+ ) ]
25+ pub gas_limit : u64 ,
2226
2327 /// The interval at which the job should build a new payload after the last.
2428 ///
@@ -42,7 +46,7 @@ impl Default for PayloadBuilderArgs {
4246 Self {
4347 extra_data : default_extra_data ( ) ,
4448 interval : Duration :: from_secs ( 1 ) ,
45- gas_limit : None ,
49+ gas_limit : ETHEREUM_BLOCK_GAS_LIMIT_36M ,
4650 deadline : SLOT_DURATION ,
4751 max_payload_tasks : 3 ,
4852 }
@@ -63,7 +67,7 @@ impl PayloadBuilderConfig for PayloadBuilderArgs {
6367 }
6468
6569 fn gas_limit ( & self ) -> Option < u64 > {
66- self . gas_limit
70+ Some ( self . gas_limit )
6771 }
6872
6973 fn max_payload_tasks ( & self ) -> usize {
0 commit comments