Skip to content

Commit

Permalink
make gas limit config value non optional
Browse files Browse the repository at this point in the history
  • Loading branch information
eserilev committed Oct 26, 2024
1 parent 3901113 commit 7ae2e2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions validator_client/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use crate::beacon_node_fallback::ApiTopic;
use crate::cli::ValidatorClient;
use crate::graffiti_file::GraffitiFile;
use crate::validator_store::DEFAULT_GAS_LIMIT;
use crate::{beacon_node_fallback, http_api, http_metrics, BeaconNodeSyncDistanceTiers};
use clap::ArgMatches;
use clap_utils::{flags::DISABLE_MALLOC_TUNING_FLAG, parse_required};
Expand Down Expand Up @@ -70,7 +71,7 @@ pub struct Config {
/// Overrides the timestamp field in builder api ValidatorRegistrationV1
pub builder_registration_timestamp_override: Option<u64>,
/// Fallback gas limit.
pub gas_limit: Option<u64>,
pub gas_limit: u64,
/// A list of custom certificates that the validator client will additionally use when
/// connecting to a beacon node over SSL/TLS.
pub beacon_nodes_tls_certs: Option<Vec<PathBuf>>,
Expand Down Expand Up @@ -127,7 +128,7 @@ impl Default for Config {
beacon_nodes_tls_certs: None,
builder_proposals: false,
builder_registration_timestamp_override: None,
gas_limit: None,
gas_limit: DEFAULT_GAS_LIMIT,
broadcast_topics: vec![ApiTopic::Subscriptions],
enable_latency_measurement_service: true,
validator_registration_batch_size: 500,
Expand Down Expand Up @@ -350,7 +351,7 @@ impl Config {
validator_client_config.enable_doppelganger_protection;
config.builder_proposals = validator_client_config.builder_proposals;
config.prefer_builder_proposals = validator_client_config.prefer_builder_proposals;
config.gas_limit = Some(validator_client_config.gas_limit);
config.gas_limit = validator_client_config.gas_limit;

config.builder_registration_timestamp_override =
validator_client_config.builder_registration_timestamp_override;
Expand Down
2 changes: 1 addition & 1 deletion validator_client/src/validator_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ impl<T: SlotClock + 'static, E: EthSpec> ValidatorStore<T, E> {
doppelganger_service,
slot_clock,
fee_recipient_process: config.fee_recipient,
gas_limit: config.gas_limit,
gas_limit: Some(config.gas_limit),
builder_proposals: config.builder_proposals,
enable_web3signer_slashing_protection: config.enable_web3signer_slashing_protection,
prefer_builder_proposals: config.prefer_builder_proposals,
Expand Down

0 comments on commit 7ae2e2a

Please sign in to comment.