Partially implement --terminal-block-hash-override

This commit is contained in:
Paul Hauner
2021-09-28 14:22:21 +10:00
parent 559236de39
commit c69c3eafe7
4 changed files with 22 additions and 3 deletions

View File

@@ -376,8 +376,19 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
.help("Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. \
This flag should only be used if the user has a clear understanding that \
the broad Ethereum community has elected to override the terminal difficulty. \
Failure to do so will cause your node to experience a consensus failure. \
Be extremely careful with the use of this flag.")
Incorrect use of this flag will cause your node to experience a consensus
failure. Be extremely careful with this flag.")
.takes_value(true)
)
.arg(
Arg::with_name("terminal-block-hash-override")
.long("terminal-block-hash-override")
.value_name("TERMINAL_BLOCK_HASH")
.help("Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. \
This flag should only be used if the user has a clear understanding that \
the broad Ethereum community has elected to override the terminal PoW block. \
Incorrect use of this flag will cause your node to experience a consensus
failure. Be extremely careful with this flag.")
.takes_value(true)
)
.arg(

View File

@@ -238,6 +238,8 @@ pub fn get_config<E: EthSpec>(
}
client_config.fee_recipient = clap_utils::parse_optional(cli_args, "fee-recipient")?;
client_config.terminal_block_hash =
clap_utils::parse_optional(cli_args, "terminal-block-hash")?;
if let Some(freezer_dir) = cli_args.value_of("freezer-dir") {
client_config.freezer_db_path = Some(PathBuf::from(freezer_dir));