mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-19 22:08:30 +00:00
Make the block cache optional (#8066)
Address contention on the store's `block_cache` by allowing it to be disabled when `--block-cache-size 0` is provided, and also making this the default. Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
This commit is contained in:
@@ -1839,12 +1839,25 @@ fn slots_per_restore_point_flag() {
|
||||
.run_with_zero_port();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn block_cache_size_default() {
|
||||
CommandLineTest::new()
|
||||
.run_with_zero_port()
|
||||
.with_config(|config| assert_eq!(config.store.block_cache_size, 0));
|
||||
}
|
||||
#[test]
|
||||
fn block_cache_size_flag() {
|
||||
CommandLineTest::new()
|
||||
.flag("block-cache-size", Some("4"))
|
||||
.run_with_zero_port()
|
||||
.with_config(|config| assert_eq!(config.store.block_cache_size, new_non_zero_usize(4)));
|
||||
.with_config(|config| assert_eq!(config.store.block_cache_size, 4));
|
||||
}
|
||||
#[test]
|
||||
fn block_cache_size_zero() {
|
||||
CommandLineTest::new()
|
||||
.flag("block-cache-size", Some("0"))
|
||||
.run_with_zero_port()
|
||||
.with_config(|config| assert_eq!(config.store.block_cache_size, 0));
|
||||
}
|
||||
#[test]
|
||||
fn state_cache_size_default() {
|
||||
|
||||
Reference in New Issue
Block a user