Fix comments from Michael
This commit is contained in:
parent
4ba6e916d5
commit
b4806d27eb
@ -68,10 +68,6 @@ where
|
|||||||
pub websocket_exit_signal: Option<Signal>,
|
pub websocket_exit_signal: Option<Signal>,
|
||||||
/// The clients logger.
|
/// The clients logger.
|
||||||
log: slog::Logger,
|
log: slog::Logger,
|
||||||
/*
|
|
||||||
/// Marker to pin the beacon chain generics.
|
|
||||||
phantom: PhantomData<BeaconChainTypes>,
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<S, E> Client<S, E>
|
impl<S, E> Client<S, E>
|
||||||
|
@ -49,7 +49,6 @@ impl Service {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// load the private key from CLI flag, disk or generate a new one
|
// load the private key from CLI flag, disk or generate a new one
|
||||||
// let local_private_key = load_private_key(&config, &log);
|
|
||||||
let local_peer_id = PeerId::from(local_keypair.public());
|
let local_peer_id = PeerId::from(local_keypair.public());
|
||||||
info!(log, "Libp2p Service"; "peer_id" => format!("{:?}", local_peer_id));
|
info!(log, "Libp2p Service"; "peer_id" => format!("{:?}", local_peer_id));
|
||||||
|
|
||||||
|
@ -73,11 +73,7 @@ impl<T: BeaconChainTypes + 'static> MessageHandler<T> {
|
|||||||
.for_each(move |msg| Ok(handler.handle_message(msg)))
|
.for_each(move |msg| Ok(handler.handle_message(msg)))
|
||||||
.map_err(move |_| {
|
.map_err(move |_| {
|
||||||
debug!(log, "Network message handler terminated.");
|
debug!(log, "Network message handler terminated.");
|
||||||
}), /*
|
}),
|
||||||
.then(move |_| {
|
|
||||||
debug!(log.clone(), "Message handler shutdown");
|
|
||||||
}),
|
|
||||||
*/
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Ok(handler_send)
|
Ok(handler_send)
|
||||||
|
@ -648,26 +648,24 @@ impl<T: BeaconChainTypes> SyncManager<T> {
|
|||||||
|
|
||||||
// process queued block requests
|
// process queued block requests
|
||||||
for (peer_id, block_requests) in self.import_queue.iter_mut() {
|
for (peer_id, block_requests) in self.import_queue.iter_mut() {
|
||||||
{
|
if block_requests.state == BlockRequestsState::Queued {
|
||||||
if block_requests.state == BlockRequestsState::Queued {
|
let request_id = self.current_req_id;
|
||||||
let request_id = self.current_req_id;
|
block_requests.state = BlockRequestsState::Pending(request_id);
|
||||||
block_requests.state = BlockRequestsState::Pending(request_id);
|
self.current_req_id += 1;
|
||||||
self.current_req_id += 1;
|
|
||||||
|
|
||||||
let request = BeaconBlocksRequest {
|
let request = BeaconBlocksRequest {
|
||||||
head_block_root: block_requests.target_head_root,
|
head_block_root: block_requests.target_head_root,
|
||||||
start_slot: block_requests.current_start_slot.as_u64(),
|
start_slot: block_requests.current_start_slot.as_u64(),
|
||||||
count: MAX_BLOCKS_PER_REQUEST,
|
count: MAX_BLOCKS_PER_REQUEST,
|
||||||
step: 0,
|
step: 0,
|
||||||
};
|
};
|
||||||
request_blocks(
|
request_blocks(
|
||||||
&mut self.network,
|
&mut self.network,
|
||||||
&self.log,
|
&self.log,
|
||||||
peer_id.clone(),
|
peer_id.clone(),
|
||||||
request_id,
|
request_id,
|
||||||
request,
|
request,
|
||||||
);
|
);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user