fn push_missing_blocks(&mut self, req: ChainPullRequest<HeaderHash>) {
        let (reply_handle, stream) =
            intercom::stream_reply::<Block, network_core::error::Error>(self.logger.clone());
        self.client_box
            .send_to(ClientMsg::PullBlocksToTip(req.from, reply_handle));
        let done_logger = self.logger.clone();
        let err_logger = self.logger.clone();
        self.global_state.spawn(
            self.service
                .upload_blocks(stream)
                .map(move |_| {
                    debug!(done_logger, "finished pushing blocks");
                })
                .map_err(move |e| {
                    info!(
                        err_logger,
                        "UploadBlocks request failed";
                        "error" => ?e,
                    );
                }),
        );
    }
// Temporary support for pushing chain blocks without two-stage
// retrieval.
Temporary support for pushing chain blocks without two-stage
retrieval.
Temporary support for pushing chain blocks without two - stage retrieval .
fn push_missing_blocks(&mut self, req: ChainPullRequest<HeaderHash>) {
        let (reply_handle, stream) =
            intercom::stream_reply::<Block, network_core::error::Error>(self.logger.clone());
        self.client_box
            .send_to(ClientMsg::PullBlocksToTip(req.from, reply_handle));
        let done_logger = self.logger.clone();
        let err_logger = self.logger.clone();
        self.global_state.spawn(
            self.service
                .upload_blocks(stream)
                .map(move |_| {
                    debug!(done_logger, "finished pushing blocks");
                })
                .map_err(move |e| {
                    info!(
                        err_logger,
                        "UploadBlocks request failed";
                        "error" => ?e,
                    );
                }),
        );
    }
fn push_missing_blocks ( & mut self , req : ChainPullRequest < HeaderHash > ) { let ( reply_handle , stream ) = intercom :: stream_reply :: < Block , network_core :: error :: Error > ( self . logger . clone ( ) ) ; self . client_box . send_to ( ClientMsg :: PullBlocksToTip ( req . from , reply_handle ) ) ; let done_logger = self . logger . clone ( ) ; let err_logger = self . logger . clone ( ) ; self . global_state . spawn ( self . service . upload_blocks ( stream ) . map ( move | _ | { debug ! ( done_logger " " ) ; } ) . map_err ( move | e | { info ! ( err_logger " " " " e ) ; } ) , ) ; }
Temporary support for pushing chain blocks without two-stage
retrieval.
Temporary support for pushing chain blocks without two - stage retrieval .
&mut self
req
ChainPullRequest<HeaderHash>
&mut self
req
ChainPullRequest<HeaderHash>