mirror of
https://gitlab.com/pulsechaincom/lighthouse-pulse.git
synced 2025-01-07 11:32:21 +00:00
Fix epoch constructor misconception
This commit is contained in:
parent
b5abfe620a
commit
0d13932663
@ -418,8 +418,7 @@ pub fn get_config<E: EthSpec>(
|
|||||||
if let Some(epochs_per_blob_prune) =
|
if let Some(epochs_per_blob_prune) =
|
||||||
clap_utils::parse_optional(cli_args, "epochs-per-blob-prune")?
|
clap_utils::parse_optional(cli_args, "epochs-per-blob-prune")?
|
||||||
{
|
{
|
||||||
client_config.store.epochs_per_blob_prune =
|
client_config.store.epochs_per_blob_prune = epochs_per_blob_prune;
|
||||||
Epoch::new(epochs_per_blob_prune * E::slots_per_epoch());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1722,8 +1722,8 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> HotColdDB<E, Hot, Cold>
|
|||||||
};
|
};
|
||||||
|
|
||||||
if !force {
|
if !force {
|
||||||
if blob_info.last_pruned_epoch + self.get_config().epochs_per_blob_prune
|
if blob_info.last_pruned_epoch.as_u64() + self.get_config().epochs_per_blob_prune
|
||||||
> blob_info.next_epoch_to_prune
|
> blob_info.next_epoch_to_prune.as_u64()
|
||||||
{
|
{
|
||||||
info!(self.log, "Blobs sidecars are pruned");
|
info!(self.log, "Blobs sidecars are pruned");
|
||||||
return Ok(());
|
return Ok(());
|
||||||
|
@ -76,8 +76,8 @@ impl Slot {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Epoch {
|
impl Epoch {
|
||||||
pub const fn new(slot: u64) -> Epoch {
|
pub const fn new(epoch: u64) -> Epoch {
|
||||||
Epoch(slot)
|
Epoch(epoch)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn max_value() -> Epoch {
|
pub fn max_value() -> Epoch {
|
||||||
|
Loading…
Reference in New Issue
Block a user