mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 18:32:42 +00:00
Network protocol upgrades (#2345)
This provides a number of upgrades to gossipsub and discovery. The updates are extensive and this needs thorough testing.
This commit is contained in:
@@ -27,6 +27,13 @@ pub fn persist_dht<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>>(
|
||||
store.put_item(&DHT_DB_KEY, &PersistedDht { enrs })
|
||||
}
|
||||
|
||||
/// Attempts to clear any DHT entries.
|
||||
pub fn clear_dht<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>>(
|
||||
store: Arc<HotColdDB<E, Hot, Cold>>,
|
||||
) -> Result<(), store::Error> {
|
||||
store.hot_db.delete::<PersistedDht>(&DHT_DB_KEY)
|
||||
}
|
||||
|
||||
/// Wrapper around DHT for persistence to disk.
|
||||
pub struct PersistedDht {
|
||||
pub enrs: Vec<Enr>,
|
||||
|
||||
Reference in New Issue
Block a user