Skip to content

Commit

Permalink
Rocket picking up environment from Rocket.toml again (#801)
Browse files Browse the repository at this point in the history
* Rocket picking up environment from Rocket.toml again

* Removed unused import
  • Loading branch information
jstuczyn authored Oct 8, 2021
1 parent 727eedf commit 51dc8c8
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions validator-api/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -374,12 +374,7 @@ fn setup_rewarder(

async fn setup_rocket(config: &Config, liftoff_notify: Arc<Notify>) -> Result<Rocket<Ignite>> {
// 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())
Expand Down

0 comments on commit 51dc8c8

Please sign in to comment.