mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-20 13:24:44 +00:00
Fix hot state disk leak (#5768)
* Fix hot state leak * Don't delete the genesis state when split is 0x0!
This commit is contained in:
@@ -703,6 +703,11 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> BackgroundMigrator<E, Ho
|
||||
));
|
||||
|
||||
store.do_atomically_with_block_and_blobs_cache(batch)?;
|
||||
|
||||
// Do a quick separate pass to delete obsoleted hot states, usually pre-states from the state
|
||||
// advance which are not canonical due to blocks being applied on top.
|
||||
store.prune_old_hot_states()?;
|
||||
|
||||
debug!(log, "Database pruning complete");
|
||||
|
||||
Ok(PruningOutcome::Successful {
|
||||
|
||||
Reference in New Issue
Block a user