mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-21 23:08:23 +00:00
beacon_node: add --disable-deposit-contract-sync flag (#3597)
Overrides any previous option that enables the eth1 service. Useful for operating a `light` beacon node. Co-authored-by: Michael Sproul <micsproul@gmail.com>
This commit is contained in:
@@ -1527,3 +1527,37 @@ fn enabled_disable_log_timestamp_flag() {
|
||||
assert!(config.logger_config.disable_log_timestamp);
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn sync_eth1_chain_default() {
|
||||
CommandLineTest::new()
|
||||
.run_with_zero_port()
|
||||
.with_config(|config| assert_eq!(config.sync_eth1_chain, false));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn sync_eth1_chain_execution_endpoints_flag() {
|
||||
let dir = TempDir::new().expect("Unable to create temporary directory");
|
||||
CommandLineTest::new()
|
||||
.flag("execution-endpoints", Some("http://localhost:8551/"))
|
||||
.flag(
|
||||
"execution-jwt",
|
||||
dir.path().join("jwt-file").as_os_str().to_str(),
|
||||
)
|
||||
.run_with_zero_port()
|
||||
.with_config(|config| assert_eq!(config.sync_eth1_chain, true));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn sync_eth1_chain_disable_deposit_contract_sync_flag() {
|
||||
let dir = TempDir::new().expect("Unable to create temporary directory");
|
||||
CommandLineTest::new()
|
||||
.flag("disable-deposit-contract-sync", None)
|
||||
.flag("execution-endpoints", Some("http://localhost:8551/"))
|
||||
.flag(
|
||||
"execution-jwt",
|
||||
dir.path().join("jwt-file").as_os_str().to_str(),
|
||||
)
|
||||
.run_with_zero_port()
|
||||
.with_config(|config| assert_eq!(config.sync_eth1_chain, false));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user