mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-11 18:04:18 +00:00
Clean up obsolete TODOs (#1734)
Squashed commit of the following:
commit f99373cbae
Author: Age Manning <Age@AgeManning.com>
Date: Mon Oct 5 18:44:09 2020 +1100
Clean up obsolute TODOs
This commit is contained in:
@@ -613,9 +613,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
|
||||
BatchState::Failed | BatchState::Poisoned | BatchState::AwaitingDownload => {
|
||||
unreachable!("batch indicates inconsistent chain state while advancing chain")
|
||||
}
|
||||
BatchState::AwaitingProcessing(..) => {
|
||||
// TODO: can we be sure the old attempts are wrong?
|
||||
}
|
||||
BatchState::AwaitingProcessing(..) => {}
|
||||
BatchState::Processing(_) => {
|
||||
assert_eq!(
|
||||
id,
|
||||
@@ -651,9 +649,6 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
|
||||
/// These events occur when a peer has successfully responded with blocks, but the blocks we
|
||||
/// have received are incorrect or invalid. This indicates the peer has not performed as
|
||||
/// intended and can result in downvoting a peer.
|
||||
// TODO: Batches could have been partially downloaded due to RPC size-limit restrictions. We
|
||||
// need to add logic for partial batch downloads. Potentially, if another peer returns the same
|
||||
// batch, we try a partial download.
|
||||
fn handle_invalid_batch(
|
||||
&mut self,
|
||||
network: &mut SyncNetworkContext<T::EthSpec>,
|
||||
|
||||
@@ -220,7 +220,10 @@ impl<T: BeaconChainTypes> RangeSync<T> {
|
||||
if let Some(removed_chain) = removed_chain {
|
||||
debug!(self.log, "Chain removed after block response"; "sync_type" => ?sync_type, "chain_id" => chain_id);
|
||||
removed_chain.status_peers(network);
|
||||
// TODO: update & update_sync_state?
|
||||
// update the state of the collection
|
||||
self.chains.update(network);
|
||||
// update the global state and inform the user
|
||||
self.chains.update_sync_state(network);
|
||||
}
|
||||
}
|
||||
Err(_) => {
|
||||
@@ -319,7 +322,10 @@ impl<T: BeaconChainTypes> RangeSync<T> {
|
||||
.call_all(|chain| chain.remove_peer(peer_id, network))
|
||||
{
|
||||
debug!(self.log, "Chain removed after removing peer"; "sync_type" => ?sync_type, "chain" => removed_chain.get_id());
|
||||
// TODO: anything else to do?
|
||||
// update the state of the collection
|
||||
self.chains.update(network);
|
||||
// update the global state and inform the user
|
||||
self.chains.update_sync_state(network);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -343,7 +349,10 @@ impl<T: BeaconChainTypes> RangeSync<T> {
|
||||
if let Some(removed_chain) = removed_chain {
|
||||
debug!(self.log, "Chain removed on rpc error"; "sync_type" => ?sync_type, "chain" => removed_chain.get_id());
|
||||
removed_chain.status_peers(network);
|
||||
// TODO: update & update_sync_state?
|
||||
// update the state of the collection
|
||||
self.chains.update(network);
|
||||
// update the global state and inform the user
|
||||
self.chains.update_sync_state(network);
|
||||
}
|
||||
}
|
||||
Err(_) => {
|
||||
|
||||
Reference in New Issue
Block a user