mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-31 13:17:09 +00:00
Implement beacon_blocks_by_head (#9237)
Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>
This commit is contained in:
@@ -243,6 +243,13 @@ impl<T: BeaconChainTypes> Router<T> {
|
||||
request,
|
||||
),
|
||||
),
|
||||
RequestType::BlocksByHead(request) => self.handle_beacon_processor_send_result(
|
||||
self.network_beacon_processor.send_blocks_by_head_request(
|
||||
peer_id,
|
||||
inbound_request_id,
|
||||
request,
|
||||
),
|
||||
),
|
||||
RequestType::PayloadEnvelopesByRoot(request) => self
|
||||
.handle_beacon_processor_send_result(
|
||||
self.network_beacon_processor
|
||||
@@ -346,6 +353,11 @@ impl<T: BeaconChainTypes> Router<T> {
|
||||
Response::PayloadEnvelopesByRoot(_) | Response::PayloadEnvelopesByRange(_) => {
|
||||
debug!("Requesting envelopes by root and by range not supported yet");
|
||||
}
|
||||
// Lighthouse currently only serves BlocksByHead and does not issue it as a client,
|
||||
// so receiving a response is unexpected. Drop it without crashing.
|
||||
Response::BlocksByHead(_) => {
|
||||
debug!("BlocksByHead response received but not requested by lighthouse");
|
||||
}
|
||||
// Light client responses should not be received
|
||||
Response::LightClientBootstrap(_)
|
||||
| Response::LightClientOptimisticUpdate(_)
|
||||
|
||||
Reference in New Issue
Block a user