zebrad: rename Syncer to ChainSync
This name clarifies what is being synced and avoids an agent-noun construction.
This commit is contained in:
parent
0bc79686b8
commit
9b6e66c1b9
|
@ -22,7 +22,7 @@
|
||||||
use crate::components::tokio::RuntimeRun;
|
use crate::components::tokio::RuntimeRun;
|
||||||
use crate::config::ZebradConfig;
|
use crate::config::ZebradConfig;
|
||||||
use crate::{
|
use crate::{
|
||||||
components::{tokio::TokioComponent, Syncer},
|
components::{tokio::TokioComponent, ChainSync},
|
||||||
prelude::*,
|
prelude::*,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ impl StartCmd {
|
||||||
);
|
);
|
||||||
let (peer_set, _address_book) = zebra_network::init(config.network.clone(), node).await;
|
let (peer_set, _address_book) = zebra_network::init(config.network.clone(), node).await;
|
||||||
|
|
||||||
let mut syncer = Syncer::new(config.network.network, peer_set, state, verifier);
|
let mut syncer = ChainSync::new(config.network.network, peer_set, state, verifier);
|
||||||
|
|
||||||
syncer.sync().await
|
syncer.sync().await
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,4 +3,4 @@ mod sync;
|
||||||
pub mod tokio;
|
pub mod tokio;
|
||||||
pub mod tracing;
|
pub mod tracing;
|
||||||
|
|
||||||
pub use sync::Syncer;
|
pub use sync::ChainSync;
|
||||||
|
|
|
@ -106,7 +106,7 @@ struct CheckedTip {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Syncer<ZN, ZS, ZV>
|
pub struct ChainSync<ZN, ZS, ZV>
|
||||||
where
|
where
|
||||||
ZN: Service<zn::Request, Response = zn::Response, Error = Error> + Send + Clone + 'static,
|
ZN: Service<zn::Request, Response = zn::Response, Error = Error> + Send + Clone + 'static,
|
||||||
ZN::Future: Send,
|
ZN::Future: Send,
|
||||||
|
@ -127,7 +127,7 @@ where
|
||||||
genesis_hash: block::Hash,
|
genesis_hash: block::Hash,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<ZN, ZS, ZV> Syncer<ZN, ZS, ZV>
|
impl<ZN, ZS, ZV> ChainSync<ZN, ZS, ZV>
|
||||||
where
|
where
|
||||||
ZN: Service<zn::Request, Response = zn::Response, Error = Error> + Send + Clone + 'static,
|
ZN: Service<zn::Request, Response = zn::Response, Error = Error> + Send + Clone + 'static,
|
||||||
ZN::Future: Send,
|
ZN::Future: Send,
|
||||||
|
|
Loading…
Reference in New Issue