@@ -35,18 +35,18 @@ mod handler;
3535mod tests;
3636
3737pub use commands:: { BlockchainManagerCommand , IncomingBlockOk } ;
38- use syncer:: SyncerHandle ;
38+ use syncer:: Syncer ;
3939
4040/// Initialize the blockchain manager.
4141///
42- /// This function sets up the `BlockchainManager` and the `syncer` so that the functions in [`interface`](super::interface)
42+ /// This function sets up the `BlockchainManager` and the [`Syncer`](syncer::Syncer) so that the functions in [`interface`](super::interface)
4343/// can be called.
4444pub async fn init_blockchain_manager (
4545 clearnet_interface : NetworkInterface < ClearNet > ,
4646 blockchain_write_handle : BlockchainWriteHandle ,
4747 txpool_manager_handle : TxpoolManagerHandle ,
4848 block_downloader_config : BlockDownloaderConfig ,
49- syncer_handle : SyncerHandle ,
49+ syncer : Syncer ,
5050 command_rx : mpsc:: Receiver < BlockchainManagerCommand > ,
5151 node_ctx : crate :: NodeContext ,
5252) {
@@ -59,14 +59,13 @@ pub async fn init_blockchain_manager(
5959 fast_sync_hashes : node_ctx. fast_sync_hashes ,
6060 } ;
6161
62- tokio:: spawn ( syncer:: syncer (
62+ tokio:: spawn ( syncer. run (
6363 node_ctx. blockchain_context . clone ( ) ,
6464 chain_service,
6565 clearnet_interface. clone ( ) ,
6666 batch_tx,
6767 Arc :: clone ( & stop_current_block_downloader) ,
6868 block_downloader_config,
69- syncer_handle,
7069 ) ) ;
7170
7271 let manager = BlockchainManager {
@@ -103,7 +102,7 @@ pub struct BlockchainManager {
103102 /// The blockchain context cache, this caches the current state of the blockchain to quickly calculate/retrieve
104103 /// values without needing to go to a [`BlockchainReadHandle`].
105104 blockchain_context_service : BlockchainContextService ,
106- /// A [`Notify`] to tell the [`syncer `](syncer::syncer ) that we want to cancel this current download
105+ /// A [`Notify`] to tell the [`Syncer `](syncer::Syncer ) that we want to cancel this current download
107106 /// attempt.
108107 stop_current_block_downloader : Arc < Notify > ,
109108 /// The broadcast service, to broadcast new blocks.
0 commit comments