From b31da8cbd29408797fa50fcd49230693d26ce78c Mon Sep 17 00:00:00 2001 From: Enzo Cioppettini Date: Mon, 7 Jun 2021 01:54:33 -0300 Subject: [PATCH] remove unused block0_hash parameter --- explorer/src/settings.rs | 10 ++-------- .../src/jormungandr/explorer/mod.rs | 1 - 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/explorer/src/settings.rs b/explorer/src/settings.rs index cb57c07133..8cd65c0e68 100644 --- a/explorer/src/settings.rs +++ b/explorer/src/settings.rs @@ -1,4 +1,3 @@ -use chain_impl_mockchain::block::HeaderId; use jormungandr_lib::interfaces::{Cors, Tls}; use serde::{de, Deserialize}; use std::{fs::File, net::SocketAddr, path::PathBuf}; @@ -19,7 +18,6 @@ pub enum Error { #[derive(Debug)] pub struct Settings { pub node: Uri, - pub block0_hash: HeaderId, pub binding_address: SocketAddr, pub address_bech32_prefix: String, pub tls: Option, @@ -39,11 +37,9 @@ impl Settings { let node = cmd .node - .or(file.host) + .or(file.node) .unwrap_or_else(|| "127.0.0.1:8299".parse().unwrap()); - let block0_hash = cmd.block0_hash.parse().unwrap(); - let binding_address = cmd .binding_address .or(file.binding_address) @@ -59,7 +55,6 @@ impl Settings { Ok(Settings { node, - block0_hash, binding_address, address_bech32_prefix, tls, @@ -73,7 +68,6 @@ impl Settings { struct CommandLine { #[structopt(long)] pub node: Option, - pub block0_hash: String, #[structopt(long)] pub binding_address: Option, #[structopt(long)] @@ -88,7 +82,7 @@ pub struct Config { pub tls: Option, pub cors: Option, #[serde(default, deserialize_with = "deserialize_uri_string")] - pub host: Option, + pub node: Option, pub binding_address: Option, pub address_bech32_prefix: Option, } diff --git a/testing/jormungandr-integration-tests/src/jormungandr/explorer/mod.rs b/testing/jormungandr-integration-tests/src/jormungandr/explorer/mod.rs index b1e1d1c0b0..41f36c7a90 100644 --- a/testing/jormungandr-integration-tests/src/jormungandr/explorer/mod.rs +++ b/testing/jormungandr-integration-tests/src/jormungandr/explorer/mod.rs @@ -76,7 +76,6 @@ pub fn explorer_sanity_test() { handler: Some( Command::new(path) .args(&[ - block0_hash.as_ref(), "--node", format!("http://{}", jormungandr.address().to_string()).as_ref(), "--binding-address",