mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 04:37:13 +00:00
Shutdown after sync (#2519)
## Issue Addressed Resolves #2033 ## Proposed Changes Adds a flag to enable shutting down beacon node right after sync is completed. ## Additional Info Will need modification after weak subjectivity sync is enabled to change definition of a fully synced node.
This commit is contained in:
@@ -51,6 +51,12 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.help("Disables the discovery packet filter. Useful for testing in smaller networks")
|
||||
.takes_value(false),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("shutdown-after-sync")
|
||||
.long("shutdown-after-sync")
|
||||
.help("Shutdown beacon node as soon as sync is completed")
|
||||
.takes_value(false),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("zero-ports")
|
||||
.long("zero-ports")
|
||||
|
||||
@@ -467,6 +467,10 @@ pub fn set_network_config(
|
||||
config.import_all_attestations = true;
|
||||
}
|
||||
|
||||
if cli_args.is_present("shutdown-after-sync") {
|
||||
config.shutdown_after_sync = true;
|
||||
}
|
||||
|
||||
if let Some(listen_address_str) = cli_args.value_of("listen-address") {
|
||||
let listen_address = listen_address_str
|
||||
.parse()
|
||||
|
||||
Reference in New Issue
Block a user