Skip to content

Commit

Permalink
Fix options for --eth1-endpoints flag (sigp#2392)
Browse files Browse the repository at this point in the history
## Issue Addressed

N/A

## Proposed Changes

Set `config.sync_eth1_chain` to true when using just the  `--eth1-endpoints` flag (without `--eth1`).
  • Loading branch information
pawanjay176 committed Jun 4, 2021
1 parent f6280aa commit 502402c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions beacon_node/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ pub fn get_config<E: EthSpec>(
client_config.eth1.endpoints = vec![SensitiveUrl::parse(endpoint)
.map_err(|e| format!("eth1-endpoint was an invalid URL: {:?}", e))?];
} else if let Some(endpoints) = cli_args.value_of("eth1-endpoints") {
client_config.sync_eth1_chain = true;
client_config.eth1.endpoints = endpoints
.split(',')
.map(|s| SensitiveUrl::parse(s))
Expand Down
1 change: 1 addition & 0 deletions lighthouse/tests/beacon_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ fn eth1_endpoints_flag() {
"https://infura.io/secret"
);
assert_eq!(config.eth1.endpoints[1].to_string(), "https://infura.io/");
assert!(config.sync_eth1_chain);
});
}
#[test]
Expand Down

0 comments on commit 502402c

Please sign in to comment.