mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 16:55:46 +00:00
Fix lcli
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
use clap::ArgMatches;
|
use clap::ArgMatches;
|
||||||
use environment::Environment;
|
|
||||||
use eth1_test_rig::DepositContract;
|
use eth1_test_rig::DepositContract;
|
||||||
use futures::compat::Future01CompatExt;
|
use futures::compat::Future01CompatExt;
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
@@ -7,7 +6,7 @@ use std::io::Read;
|
|||||||
use types::EthSpec;
|
use types::EthSpec;
|
||||||
use web3::{transports::Http, Web3};
|
use web3::{transports::Http, Web3};
|
||||||
|
|
||||||
pub async fn run<T: EthSpec>(mut env: Environment<T>, matches: &ArgMatches) -> Result<(), String> {
|
pub async fn run<T: EthSpec>(matches: &ArgMatches<'_>) -> Result<(), String> {
|
||||||
let confirmations = matches
|
let confirmations = matches
|
||||||
.value_of("confirmations")
|
.value_of("confirmations")
|
||||||
.ok_or_else(|| "Confirmations not specified")?
|
.ok_or_else(|| "Confirmations not specified")?
|
||||||
|
|||||||
@@ -455,11 +455,9 @@ async fn run<T: EthSpec>(env_builder: EnvironmentBuilder<T>, matches: &ArgMatche
|
|||||||
.unwrap_or_else(|e| error!("Failed to transition blocks: {}", e)),
|
.unwrap_or_else(|e| error!("Failed to transition blocks: {}", e)),
|
||||||
("pretty-hex", Some(matches)) => run_parse_hex::<T>(matches)
|
("pretty-hex", Some(matches)) => run_parse_hex::<T>(matches)
|
||||||
.unwrap_or_else(|e| error!("Failed to pretty print hex: {}", e)),
|
.unwrap_or_else(|e| error!("Failed to pretty print hex: {}", e)),
|
||||||
("deploy-deposit-contract", Some(matches)) => {
|
("deploy-deposit-contract", Some(matches)) => deploy_deposit_contract::run::<T>(matches)
|
||||||
deploy_deposit_contract::run::<T>(env, matches)
|
.await
|
||||||
.await
|
.unwrap_or_else(|e| error!("Failed to run deploy-deposit-contract command: {}", e)),
|
||||||
.unwrap_or_else(|e| error!("Failed to run deploy-deposit-contract command: {}", e))
|
|
||||||
}
|
|
||||||
("refund-deposit-contract", Some(matches)) => {
|
("refund-deposit-contract", Some(matches)) => {
|
||||||
refund_deposit_contract::run::<T>(env, matches)
|
refund_deposit_contract::run::<T>(env, matches)
|
||||||
.await
|
.await
|
||||||
|
|||||||
Reference in New Issue
Block a user