make explicity BlobsUnavailable error and handle it directly

This commit is contained in:
realbigsean
2023-01-18 17:47:32 -05:00
committed by Emilia Hane
parent f7f64eb007
commit e1ce4e5b78
3 changed files with 35 additions and 7 deletions

View File

@@ -293,6 +293,21 @@ impl<T: BeaconChainTypes> Worker<T> {
"request_root" => ?root
);
}
Err(BeaconChainError::BlobsUnavailable) => {
error!(
self.log,
"No blobs in the store for block root";
"block_root" => ?root
);
self.send_error_response(
peer_id,
RPCResponseErrorCode::ResourceUnavailable,
"Blobs unavailable".into(),
request_id,
);
send_response = false;
break;
}
Err(BeaconChainError::BlockHashMissingFromExecutionLayer(_)) => {
debug!(
self.log,
@@ -747,6 +762,21 @@ impl<T: BeaconChainTypes> Worker<T> {
send_response = false;
break;
}
Err(BeaconChainError::BlobsUnavailable) => {
error!(
self.log,
"No blobs in the store for block root";
"block_root" => ?root
);
self.send_error_response(
peer_id,
RPCResponseErrorCode::ResourceUnavailable,
"Blobs unavailable".into(),
request_id,
);
send_response = false;
break;
}
Err(e) => {
error!(
self.log,