Skip to content

Commit

Permalink
add LightClientUpdate to handle_rpc functions
Browse files Browse the repository at this point in the history
  • Loading branch information
GeemoCandama committed Mar 30, 2023
1 parent 6c93df9 commit 7b71ab6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion beacon_node/network/src/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,12 @@ impl<T: BeaconChainTypes> Router<T> {
Request::LightClientBootstrap(request) => self.send_beacon_processor_work(
BeaconWorkEvent::lightclient_bootstrap_request(peer_id, request_id, request),
),
Request::LightClientOptimisticUpdate => self.send_beacon_processor_work(
BeaconWorkEvent::light_client_optimistic_update_request(peer_id, request_id),
),
Request::LightClientFinalityUpdate => self.send_beacon_processor_work(
BeaconWorkEvent::light_client_finality_update_request(peer_id, request_id),
),
}
}

Expand All @@ -223,7 +229,10 @@ impl<T: BeaconChainTypes> Router<T> {
Response::BlocksByRoot(beacon_block) => {
self.on_blocks_by_root_response(peer_id, request_id, beacon_block);
}
Response::LightClientBootstrap(_) => unreachable!(),
// Light client responses should not be received
Response::LightClientBootstrap(_)
| Response::LightClientOptimisticUpdate(_)
| Response::LightClientFinalityUpdate(_) => unreachable!(),
}
}

Expand Down

0 comments on commit 7b71ab6

Please sign in to comment.