mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-24 19:31:14 +00:00
Add an authority_discovery_known_authorities_count metric (#6614)
This commit is contained in:
@@ -68,6 +68,11 @@ where
|
||||
self.cache.insert(id, addresses);
|
||||
}
|
||||
|
||||
/// Returns the number of authority IDs in the cache.
|
||||
pub fn num_ids(&self) -> usize {
|
||||
self.cache.len()
|
||||
}
|
||||
|
||||
// Each node should connect to a subset of all authorities. In order to prevent hot spots, this
|
||||
// selection is based on randomness. Selecting randomly each time we alter the address cache
|
||||
// would result in connection churn. To reduce this churn a node generates a seed on startup and
|
||||
|
||||
Reference in New Issue
Block a user