From 51dc8c81ed320951385bd9944030cd2c1f045118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Fri, 8 Oct 2021 14:33:29 +0100 Subject: [PATCH] Rocket picking up environment from Rocket.toml again (#801) * Rocket picking up environment from Rocket.toml again * Removed unused import --- validator-api/src/main.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/validator-api/src/main.rs b/validator-api/src/main.rs index 737f688d85..c0fce208b5 100644 --- a/validator-api/src/main.rs +++ b/validator-api/src/main.rs @@ -12,7 +12,7 @@ use crate::nymd_client::Client; use crate::rewarding::epoch::Epoch; use crate::rewarding::Rewarder; use crate::storage::NodeStatusStorage; -use ::config::{defaults::DEFAULT_VALIDATOR_API_PORT, NymConfig}; +use ::config::NymConfig; use anyhow::Result; use cache::ValidatorCache; use clap::{App, Arg, ArgMatches}; @@ -374,12 +374,7 @@ fn setup_rewarder( async fn setup_rocket(config: &Config, liftoff_notify: Arc) -> Result> { // let's build our rocket! - let rocket_config = rocket::config::Config { - // TODO: probably the port should be configurable? - port: DEFAULT_VALIDATOR_API_PORT, - ..Default::default() - }; - let rocket = rocket::custom(rocket_config) + let rocket = rocket::build() .attach(setup_cors()?) .attach(setup_liftoff_notify(liftoff_notify)) .attach(ValidatorCache::stage())