Plug in pruning of blobs into app

This commit is contained in:
Emilia Hane
2023-01-08 16:22:11 +01:00
parent 7bf88c2336
commit fe0c911402
3 changed files with 48 additions and 0 deletions

View File

@@ -914,6 +914,20 @@ where
);
}
// Prune blobs sidecars older than the blob data availability boundary in the background.
if beacon_chain.store.get_config().prune_blobs {
let store = beacon_chain.store.clone();
let log = log.clone();
beacon_chain.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",
);
}
Ok(beacon_chain)
}
}