mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-08 17:26:04 +00:00
Resolve some TODOs
This commit is contained in:
@@ -191,7 +191,6 @@ impl<T: BeaconChainTypes> BlockComponentsByRangeRequest<T> {
|
|||||||
blocks_by_range_request,
|
blocks_by_range_request,
|
||||||
} => {
|
} => {
|
||||||
if let Some((blocks, block_peer)) = blocks_by_range_request.to_finished() {
|
if let Some((blocks, block_peer)) = blocks_by_range_request.to_finished() {
|
||||||
// TODO(das): use the peer group
|
|
||||||
let peer_group = BatchPeers::new_from_block_peer(*block_peer);
|
let peer_group = BatchPeers::new_from_block_peer(*block_peer);
|
||||||
let rpc_blocks = couple_blocks_base(
|
let rpc_blocks = couple_blocks_base(
|
||||||
blocks.to_vec(),
|
blocks.to_vec(),
|
||||||
@@ -226,7 +225,6 @@ impl<T: BeaconChainTypes> BlockComponentsByRangeRequest<T> {
|
|||||||
blocks_by_range_request,
|
blocks_by_range_request,
|
||||||
} => {
|
} => {
|
||||||
if let Some((blocks, block_peer)) = blocks_by_range_request.to_finished() {
|
if let Some((blocks, block_peer)) = blocks_by_range_request.to_finished() {
|
||||||
// TODO(das): use the peer group
|
|
||||||
let blocks_with_data = blocks
|
let blocks_with_data = blocks
|
||||||
.iter()
|
.iter()
|
||||||
.filter(|block| block.has_data())
|
.filter(|block| block.has_data())
|
||||||
|
|||||||
@@ -425,8 +425,7 @@ impl<T: BeaconChainTypes> ActiveCustodyByRangeRequest<T> {
|
|||||||
// - Add a new peer that custodies the missing columns
|
// - Add a new peer that custodies the missing columns
|
||||||
// - Call `continue_requests`
|
// - Call `continue_requests`
|
||||||
//
|
//
|
||||||
// Otherwise this request should be dropped and failed after some time.
|
// Otherwise this request will be dropped and failed after some time.
|
||||||
// TODO(das): implement the above
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -249,7 +249,6 @@ impl<T: BeaconChainTypes> ActiveCustodyByRootRequest<T> {
|
|||||||
let active_request_count_by_peer = cx.active_request_count_by_peer();
|
let active_request_count_by_peer = cx.active_request_count_by_peer();
|
||||||
let mut columns_to_request_by_peer = HashMap::<PeerId, Vec<ColumnIndex>>::new();
|
let mut columns_to_request_by_peer = HashMap::<PeerId, Vec<ColumnIndex>>::new();
|
||||||
let lookup_peers = self.lookup_peers.read();
|
let lookup_peers = self.lookup_peers.read();
|
||||||
let mut indices_without_peers = vec![];
|
|
||||||
|
|
||||||
// Need to:
|
// Need to:
|
||||||
// - track how many active requests a peer has for load balancing
|
// - track how many active requests a peer has for load balancing
|
||||||
@@ -304,9 +303,7 @@ impl<T: BeaconChainTypes> ActiveCustodyByRootRequest<T> {
|
|||||||
// - Add a new peer that custodies the missing columns
|
// - Add a new peer that custodies the missing columns
|
||||||
// - Call `continue_requests`
|
// - Call `continue_requests`
|
||||||
//
|
//
|
||||||
// Otherwise this request should be dropped and failed after some time.
|
// Otherwise this request will be dropped and failed after some time.
|
||||||
// TODO(das): implement the above
|
|
||||||
indices_without_peers.push(column_index);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user