mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-18 12:22:51 +00:00
Plug in running blob pruning in migrator, related bug fixes and add todos
This commit is contained in:
@@ -915,19 +915,9 @@ 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();
|
||||
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, data_availability_boundary) {
|
||||
error!(log, "Error pruning blobs in background"; "error" => ?e);
|
||||
}
|
||||
},
|
||||
"prune_blobs_background",
|
||||
);
|
||||
}
|
||||
beacon_chain
|
||||
.store_migrator
|
||||
.process_prune_blobs(beacon_chain.data_availability_boundary());
|
||||
|
||||
Ok(beacon_chain)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user