mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 10:22:38 +00:00
Fix execution layer redundancy (#5588)
* remove execution layer url redundancy * fix typo * fix tests * fix formatting
This commit is contained in:
@@ -419,21 +419,17 @@ where
|
||||
self
|
||||
}
|
||||
|
||||
pub fn execution_layer_from_urls(mut self, urls: &[&str]) -> Self {
|
||||
pub fn execution_layer_from_url(mut self, url: &str) -> Self {
|
||||
assert!(
|
||||
self.execution_layer.is_none(),
|
||||
"execution layer already defined"
|
||||
);
|
||||
|
||||
let urls: Vec<SensitiveUrl> = urls
|
||||
.iter()
|
||||
.map(|s| SensitiveUrl::parse(s))
|
||||
.collect::<Result<_, _>>()
|
||||
.unwrap();
|
||||
let url = SensitiveUrl::parse(url).ok();
|
||||
|
||||
let config = execution_layer::Config {
|
||||
execution_endpoints: urls,
|
||||
secret_files: vec![],
|
||||
execution_endpoint: url,
|
||||
secret_file: None,
|
||||
suggested_fee_recipient: Some(Address::repeat_byte(42)),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user