zebrad: move sync into components module.

Part of #1030.
This commit is contained in:
Henry de Valence 2020-09-09 12:03:09 -07:00
parent b881eafe47
commit 0bc79686b8
3 changed files with 8 additions and 4 deletions

View File

@ -21,14 +21,15 @@
use crate::components::tokio::RuntimeRun;
use crate::config::ZebradConfig;
use crate::{components::tokio::TokioComponent, prelude::*};
use crate::{
components::{tokio::TokioComponent, Syncer},
prelude::*,
};
use abscissa_core::{config, Command, FrameworkError, Options, Runnable};
use color_eyre::eyre::Report;
use tower::{buffer::Buffer, service_fn};
mod sync;
/// `start` subcommand
#[derive(Command, Debug, Options)]
pub struct StartCmd {
@ -60,7 +61,7 @@ impl StartCmd {
);
let (peer_set, _address_book) = zebra_network::init(config.network.clone(), node).await;
let mut syncer = sync::Syncer::new(config.network.network, peer_set, state, verifier);
let mut syncer = Syncer::new(config.network.network, peer_set, state, verifier);
syncer.sync().await
}

View File

@ -1,3 +1,6 @@
pub mod metrics;
mod sync;
pub mod tokio;
pub mod tracing;
pub use sync::Syncer;