pub fn start_pruner(
db: Db,
config: PrunerConfig,
metrics: Arc<PrunerMetrics>,
) -> Result<Service>Expand description
Start the background pruner as a Service.
Errors if config.retention_epochs is 0 (which would prune the
current epoch). The returned service runs an infinite tick loop;
it is aborted on graceful shutdown (each chunk is atomic, so an
abort leaves the database consistent).