Add flag to disable prune on startup

This commit is contained in:
Michael Sproul
2022-09-12 11:41:45 +10:00
parent de775d6aa5
commit b28e8d0848
5 changed files with 34 additions and 3 deletions

View File

@@ -21,6 +21,8 @@ pub struct StoreConfig {
pub compact_on_init: bool,
/// Whether to compact the database during database pruning.
pub compact_on_prune: bool,
/// Whether to try pruning execution payloads on initialization.
pub prune_payloads_on_init: bool,
}
/// Variant of `StoreConfig` that gets written to disk. Contains immutable configuration params.
@@ -43,6 +45,7 @@ impl Default for StoreConfig {
block_cache_size: DEFAULT_BLOCK_CACHE_SIZE,
compact_on_init: false,
compact_on_prune: true,
prune_payloads_on_init: true,
}
}
}