Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions cmd/ethrex/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,14 @@ pub struct Options {
help_heading = "Block producer options"
)]
pub extra_data: String,
#[arg(
long = "block-producer.gas-limit",
default_value = None,
value_name = "GAS_LIMIT",
help = "Target block gas limit.",
help_heading = "Block producer options"
)]
pub gas_limit: Option<u64>,
}

impl Options {
Expand Down Expand Up @@ -302,6 +310,7 @@ impl Default for Options {
tx_broadcasting_time_interval: Default::default(),
target_peers: Default::default(),
extra_data: get_minimal_client_version(),
gas_limit: None,
}
}
}
Expand Down
11 changes: 3 additions & 8 deletions cmd/ethrex/initializers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ pub fn init_blockchain(store: Store, blockchain_opts: BlockchainOptions) -> Arc<
Blockchain::new(store, blockchain_opts).into()
}

#[allow(clippy::too_many_arguments)]
#[expect(clippy::too_many_arguments)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:agite:

pub async fn init_rpc_api(
opts: &Options,
peer_handler: PeerHandler,
Expand All @@ -141,8 +141,6 @@ pub async fn init_rpc_api(
cancel_token: CancellationToken,
tracker: TaskTracker,
log_filter_handler: Option<reload::Handle<EnvFilter, Registry>>,
gas_ceil: Option<u64>,
extra_data: String,
) {
init_datadir(&opts.datadir);

Expand Down Expand Up @@ -182,8 +180,8 @@ pub async fn init_rpc_api(
peer_handler,
get_client_version(),
log_filter_handler,
gas_ceil,
extra_data,
opts.gas_limit,
opts.extra_data.clone(),
);

tracker.spawn(rpc_api);
Expand Down Expand Up @@ -463,9 +461,6 @@ pub async fn init_l1(
cancel_token.clone(),
tracker.clone(),
log_filter_handler,
// TODO (#4482): Make this configurable.
None,
opts.extra_data.clone(),
)
.await;

Expand Down
Loading