mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-15 02:42:38 +00:00
Thread TTD into execution layer
This commit is contained in:
@@ -147,10 +147,15 @@ where
|
||||
None
|
||||
};
|
||||
|
||||
let terminal_total_difficulty = config
|
||||
.terminal_total_difficulty_override
|
||||
.unwrap_or(spec.terminal_total_difficulty);
|
||||
|
||||
let execution_layer = if let Some(execution_endpoints) = config.execution_endpoints {
|
||||
let context = runtime_context.service_context("exec".into());
|
||||
let execution_layer = ExecutionLayer::from_urls(
|
||||
execution_endpoints,
|
||||
terminal_total_difficulty,
|
||||
context.executor.clone(),
|
||||
context.log().clone(),
|
||||
)
|
||||
|
||||
@@ -4,7 +4,7 @@ use sensitive_url::SensitiveUrl;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use std::fs;
|
||||
use std::path::PathBuf;
|
||||
use types::{Graffiti, PublicKeyBytes};
|
||||
use types::{Graffiti, PublicKeyBytes, Uint256};
|
||||
|
||||
/// Default directory name for the freezer database under the top-level data dir.
|
||||
const DEFAULT_FREEZER_DB_DIR: &str = "freezer_db";
|
||||
@@ -75,7 +75,7 @@ pub struct Config {
|
||||
pub chain: beacon_chain::ChainConfig,
|
||||
pub eth1: eth1::Config,
|
||||
pub execution_endpoints: Option<Vec<SensitiveUrl>>,
|
||||
pub total_terminal_difficulty_override: Option<u64>,
|
||||
pub terminal_total_difficulty_override: Option<Uint256>,
|
||||
pub http_api: http_api::Config,
|
||||
pub http_metrics: http_metrics::Config,
|
||||
pub monitoring_api: Option<monitoring_api::Config>,
|
||||
@@ -97,7 +97,7 @@ impl Default for Config {
|
||||
sync_eth1_chain: false,
|
||||
eth1: <_>::default(),
|
||||
execution_endpoints: None,
|
||||
total_terminal_difficulty_override: None,
|
||||
terminal_total_difficulty_override: None,
|
||||
disabled_forks: Vec::new(),
|
||||
graffiti: Graffiti::default(),
|
||||
http_api: <_>::default(),
|
||||
|
||||
Reference in New Issue
Block a user