mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-19 05:48:31 +00:00
Add method for dropping pubkey cache. Add bench.
This commit is contained in:
@@ -322,6 +322,11 @@ impl BeaconState {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Completely drops the `pubkey_cache`, replacing it with a new, empty cache.
|
||||
pub fn drop_pubkey_cache(&mut self) {
|
||||
self.pubkey_cache = PubkeyCache::empty()
|
||||
}
|
||||
|
||||
/// If a validator pubkey exists in the validator registry, returns `Some(i)`, otherwise
|
||||
/// returns `None`.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user