diff --git a/beacon_node/beacon_chain/src/canonical_head.rs b/beacon_node/beacon_chain/src/canonical_head.rs index 19eddf602..83fe1940a 100644 --- a/beacon_node/beacon_chain/src/canonical_head.rs +++ b/beacon_node/beacon_chain/src/canonical_head.rs @@ -793,6 +793,19 @@ impl BeaconChain { .execution_status .is_optimistic_or_invalid(); + if self.store.get_config().prune_blobs { + let store = self.store.clone(); + let log = self.log.clone(); + self.task_executor.spawn_blocking( + move || { + if let Err(e) = store.try_prune_blobs(false) { + error!(log, "Error pruning blobs in background"; "error" => ?e); + } + }, + "prune_blobs_background", + ); + } + // Detect and potentially report any re-orgs. let reorg_distance = detect_reorg( &old_snapshot.beacon_state,