mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-06 18:21:45 +00:00
Allow user to set an epoch margin for pruning
This commit is contained in:
@@ -568,6 +568,14 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.takes_value(true)
|
||||
.default_value("1")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("blob-prune-margin-epochs")
|
||||
.long("blob-prune-margin-epochs")
|
||||
.help("The margin for blob pruning in epochs. The oldest blobs are pruned \
|
||||
up until data_availability_boundary - blob_prune_margin_epochs.")
|
||||
.takes_value(true)
|
||||
.default_value("0")
|
||||
)
|
||||
|
||||
/*
|
||||
* Misc.
|
||||
|
||||
@@ -421,6 +421,14 @@ pub fn get_config<E: EthSpec>(
|
||||
client_config.store.epochs_per_blob_prune = epochs_per_blob_prune;
|
||||
}
|
||||
|
||||
if let Some(blob_prune_margin_epochs) =
|
||||
clap_utils::parse_optional(cli_args, "blob-prune-margin-epochs")?
|
||||
{
|
||||
if blob_prune_margin_epochs > 0 {
|
||||
client_config.store.blob_prune_margin_epochs = Some(blob_prune_margin_epochs);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Zero-ports
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user