mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-20 05:14:35 +00:00
Add lcli tool for checking deposit data (#940)
* Add check-deposit-data tool * Update help text * Update function name
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
extern crate log;
|
||||
|
||||
mod change_genesis_time;
|
||||
mod check_deposit_data;
|
||||
mod deploy_deposit_contract;
|
||||
mod eth1_genesis;
|
||||
mod helpers;
|
||||
@@ -359,6 +360,29 @@ fn main() {
|
||||
optimization for nodes, please do it."),
|
||||
)
|
||||
)
|
||||
.subcommand(
|
||||
SubCommand::with_name("check-deposit-data")
|
||||
.about(
|
||||
"Checks the integrity of some deposit data.",
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("deposit-amount")
|
||||
.index(1)
|
||||
.value_name("GWEI")
|
||||
.takes_value(true)
|
||||
.required(true)
|
||||
.help("The amount (in Gwei) that was deposited"),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("deposit-data")
|
||||
.index(2)
|
||||
.value_name("HEX")
|
||||
.takes_value(true)
|
||||
.required(true)
|
||||
.help("A 0x-prefixed hex string of the deposit data. Should include the
|
||||
function signature."),
|
||||
)
|
||||
)
|
||||
.get_matches();
|
||||
|
||||
macro_rules! run_with_spec {
|
||||
@@ -445,6 +469,8 @@ fn run<T: EthSpec>(env_builder: EnvironmentBuilder<T>, matches: &ArgMatches) {
|
||||
.unwrap_or_else(|e| error!("Failed to run change-genesis-time command: {}", e)),
|
||||
("new-testnet", Some(matches)) => new_testnet::run::<T>(matches)
|
||||
.unwrap_or_else(|e| error!("Failed to run new_testnet command: {}", e)),
|
||||
("check-deposit-data", Some(matches)) => check_deposit_data::run::<T>(matches)
|
||||
.unwrap_or_else(|e| error!("Failed to run check-deposit-data command: {}", e)),
|
||||
(other, _) => error!("Unknown subcommand {}. See --help.", other),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user