mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-06 18:21:45 +00:00
Improve genesis service (#1103)
* Update for latest master * Shift delay inside loop * Clean up genesis service * Tidy * Tidy logs * Address Michael's comments * Add pre-genesis logging * Remove est time till genesis * Fix time formatting * Tidy
This commit is contained in:
@@ -167,6 +167,13 @@ impl Service {
|
||||
&self.inner.deposit_cache
|
||||
}
|
||||
|
||||
/// Removes all blocks from the cache, except for the latest block.
|
||||
///
|
||||
/// We don't remove the latest blocks so we don't lose track of the latest block.
|
||||
pub fn clear_block_cache(&self) {
|
||||
self.inner.block_cache.write().truncate(1)
|
||||
}
|
||||
|
||||
/// Drop the block cache, replacing it with an empty one.
|
||||
pub fn drop_block_cache(&self) {
|
||||
*(self.inner.block_cache.write()) = BlockCache::default();
|
||||
|
||||
Reference in New Issue
Block a user