Convert epochs_per_blob_prune to Epoch once
This commit is contained in:
parent
fb2ce909f6
commit
b5abfe620a
@ -418,7 +418,8 @@ pub fn get_config<E: EthSpec>(
|
||||
if let Some(epochs_per_blob_prune) =
|
||||
clap_utils::parse_optional(cli_args, "epochs-per-blob-prune")?
|
||||
{
|
||||
client_config.store.epochs_per_blob_prune = epochs_per_blob_prune;
|
||||
client_config.store.epochs_per_blob_prune =
|
||||
Epoch::new(epochs_per_blob_prune * E::slots_per_epoch());
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1722,9 +1722,9 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> HotColdDB<E, Hot, Cold>
|
||||
};
|
||||
|
||||
if !force {
|
||||
let epochs_per_blob_prune =
|
||||
Epoch::new(self.get_config().epochs_per_blob_prune * E::slots_per_epoch());
|
||||
if blob_info.last_pruned_epoch + epochs_per_blob_prune > blob_info.next_epoch_to_prune {
|
||||
if blob_info.last_pruned_epoch + self.get_config().epochs_per_blob_prune
|
||||
> blob_info.next_epoch_to_prune
|
||||
{
|
||||
info!(self.log, "Blobs sidecars are pruned");
|
||||
return Ok(());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user