clean up blob by root response (#4136)

This commit is contained in:
realbigsean
2023-03-28 12:49:32 -04:00
committed by GitHub
parent d24e5cc22a
commit deec9c51ba
6 changed files with 70 additions and 161 deletions

View File

@@ -112,6 +112,11 @@ impl<T: EthSpec, S: SlotClock> DataAvailabilityChecker<T, S> {
}
}
/// Get a blob from the RPC cache.
pub fn get_blob(&self, blob_id: &BlobIdentifier) -> Option<Arc<BlobSidecar<T>>> {
self.rpc_blob_cache.read().get(blob_id).cloned()
}
/// This first validate the KZG commitments included in the blob sidecar.
/// Check if we've cached other blobs for this block. If it completes a set and we also
/// have a block cached, return the Availability variant triggering block import.