fixup! Simplify conceptual design

This commit is contained in:
Emilia Hane
2023-01-16 21:41:24 +01:00
parent 7103a257ce
commit 20567750c1
3 changed files with 18 additions and 11 deletions

View File

@@ -918,13 +918,10 @@ where
if beacon_chain.store.get_config().prune_blobs {
let store = beacon_chain.store.clone();
let log = log.clone();
let current_slot = beacon_chain
.slot()
.map_err(|e| format!("Failed to get current slot: {:?}", e))?;
let current_epoch = current_slot.epoch(TEthSpec::slots_per_epoch());
let data_availability_boundary = beacon_chain.data_availability_boundary();
beacon_chain.task_executor.spawn_blocking(
move || {
if let Err(e) = store.try_prune_blobs(false, Some(current_epoch)) {
if let Err(e) = store.try_prune_blobs(false, data_availability_boundary) {
error!(log, "Error pruning blobs in background"; "error" => ?e);
}
},