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

@@ -267,9 +267,11 @@ where
self.genesis_time = Some(genesis_state.genesis_time());
// Prune finalized execution payloads.
store
.try_prune_execution_payloads(false)
.map_err(|e| format!("Error pruning execution payloads: {e:?}"))?;
if store.get_config().prune_payloads_on_init {
store
.try_prune_execution_payloads(false)
.map_err(|e| format!("Error pruning execution payloads: {e:?}"))?;
}
self.op_pool = Some(
store