mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-18 04:13:00 +00:00
Add a cli option for the snapshot cache size (#5270)
* Add a cli option for snapshot cache size * Remove junk * Make snapshot_cache module public * lint * Update docs
This commit is contained in:
@@ -622,6 +622,13 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.help("Specifies how many states from the freezer database should cache in memory [default: 1]")
|
||||
.takes_value(true)
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("state-cache-size")
|
||||
.long("state-cache-size")
|
||||
.value_name("STATE_CACHE_SIZE")
|
||||
.help("Specifies the size of the snapshot cache [default: 3]")
|
||||
.takes_value(true)
|
||||
)
|
||||
/*
|
||||
* Execution Layer Integration
|
||||
*/
|
||||
|
||||
@@ -170,6 +170,9 @@ pub fn get_config<E: EthSpec>(
|
||||
if let Some(cache_size) = clap_utils::parse_optional(cli_args, "shuffling-cache-size")? {
|
||||
client_config.chain.shuffling_cache_size = cache_size;
|
||||
}
|
||||
if let Some(cache_size) = clap_utils::parse_optional(cli_args, "state-cache-size")? {
|
||||
client_config.chain.snapshot_cache_size = cache_size;
|
||||
}
|
||||
|
||||
/*
|
||||
* Prometheus metrics HTTP server
|
||||
|
||||
Reference in New Issue
Block a user