From ba882958eda8b95b865b2748015772546aa91da9 Mon Sep 17 00:00:00 2001 From: Emilia Hane Date: Wed, 1 Feb 2023 14:05:18 +0100 Subject: [PATCH] Delete blobs along with block --- beacon_node/store/src/hot_cold_store.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/beacon_node/store/src/hot_cold_store.rs b/beacon_node/store/src/hot_cold_store.rs index 194ac2f01..d1e33d51d 100644 --- a/beacon_node/store/src/hot_cold_store.rs +++ b/beacon_node/store/src/hot_cold_store.rs @@ -544,8 +544,9 @@ impl, Cold: ItemStore> HotColdDB self.hot_db .key_delete(DBColumn::BeaconBlock.into(), block_root.as_bytes())?; self.hot_db - .key_delete(DBColumn::ExecPayload.into(), block_root.as_bytes()) - // todo(emhane): do we want to delete the corresponding blobs here too? + .key_delete(DBColumn::ExecPayload.into(), block_root.as_bytes())?; + let blobs_db = self.blobs_db.as_ref().unwrap_or(&self.cold_db); + blobs_db.key_delete(DBColumn::BeaconBlob.into(), block_root.as_bytes()) } pub fn put_blobs(&self, block_root: &Hash256, blobs: BlobsSidecar) -> Result<(), Error> {