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