mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 09:51:10 +00:00
frame/authority-discovery: Have authorities() return both current and next (#6788)
* frame/authority-discovery: Have authorities() return both current and next Authority address lookups on the DHT happen periodically (every 10 mintues) and are rather slow (~10 seconds). In order to smooth the transition period between two sessions, have the runtime module return both the current as well as the next authority set. Thereby the client authority module will: 1. Publish its addresses one session in advance. 2. Prefetch the addresses of authorities of the next session in advance. * frame/authority-discovery: Deduplicate authority ids * frame/authority-discovery: Don't dedup on_genesis authorities * frame/authority-discovery: Remove mut and sort on comparison in tests * frame/authority-discovery: Use BTreeSet for deduplication
This commit is contained in:
@@ -45,9 +45,9 @@ sp_api::decl_runtime_apis! {
|
||||
/// The authority discovery api.
|
||||
///
|
||||
/// This api is used by the `client/authority-discovery` module to retrieve identifiers
|
||||
/// of the current authority set.
|
||||
/// of the current and next authority set.
|
||||
pub trait AuthorityDiscoveryApi {
|
||||
/// Retrieve authority identifiers of the current authority set.
|
||||
/// Retrieve authority identifiers of the current and next authority set.
|
||||
fn authorities() -> Vec<AuthorityId>;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user