Skip to content

Commit

Permalink
remove unused block0_hash parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
ecioppettini committed Jun 7, 2021
1 parent 532547f commit b31da8c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
10 changes: 2 additions & 8 deletions explorer/src/settings.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand All @@ -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<Tls>,
Expand All @@ -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)
Expand All @@ -59,7 +55,6 @@ impl Settings {

Ok(Settings {
node,
block0_hash,
binding_address,
address_bech32_prefix,
tls,
Expand All @@ -73,7 +68,6 @@ impl Settings {
struct CommandLine {
#[structopt(long)]
pub node: Option<Uri>,
pub block0_hash: String,
#[structopt(long)]
pub binding_address: Option<SocketAddr>,
#[structopt(long)]
Expand All @@ -88,7 +82,7 @@ pub struct Config {
pub tls: Option<Tls>,
pub cors: Option<Cors>,
#[serde(default, deserialize_with = "deserialize_uri_string")]
pub host: Option<Uri>,
pub node: Option<Uri>,
pub binding_address: Option<SocketAddr>,
pub address_bech32_prefix: Option<String>,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit b31da8c

Please sign in to comment.