mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-20 14:28:37 +00:00
Require manual confirmation to purge database with purge-db (#6154)
* Require manual confirmation to purge database * Fix tests * Rename to `purge-db-force and skip in non-interactive mode * Do not skip when stdin_inputs is true * Change prompt to be info logging to ensure consistent output * Update warning text * Move delete log after deletion
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
mod cli;
|
||||
mod metrics;
|
||||
|
||||
use account_utils::STDIN_INPUTS_FLAG;
|
||||
use beacon_node::ProductionBeaconNode;
|
||||
use clap::FromArgMatches;
|
||||
use clap::Subcommand;
|
||||
@@ -104,6 +105,16 @@ fn main() {
|
||||
)
|
||||
.long_version(LONG_VERSION.as_str())
|
||||
.display_order(0)
|
||||
.arg(
|
||||
Arg::new(STDIN_INPUTS_FLAG)
|
||||
.long(STDIN_INPUTS_FLAG)
|
||||
.action(ArgAction::SetTrue)
|
||||
.help("If present, read all user inputs from stdin instead of tty.")
|
||||
.help_heading(FLAG_HEADER)
|
||||
.hide(cfg!(windows))
|
||||
.global(true)
|
||||
.display_order(0),
|
||||
)
|
||||
.arg(
|
||||
Arg::new("env_log")
|
||||
.short('l')
|
||||
|
||||
@@ -15,7 +15,7 @@ use account_manager::{
|
||||
use account_utils::{
|
||||
eth2_keystore::KeystoreBuilder,
|
||||
validator_definitions::{SigningDefinition, ValidatorDefinition, ValidatorDefinitions},
|
||||
ZeroizeString,
|
||||
ZeroizeString, STDIN_INPUTS_FLAG,
|
||||
};
|
||||
use slashing_protection::{SlashingDatabase, SLASHING_PROTECTION_FILENAME};
|
||||
use std::env;
|
||||
|
||||
Reference in New Issue
Block a user