mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 17:01:09 +00:00
Remove deprecated authorities function (#2785)
* Remove deprecated authorities function * Bump spec * Fixes compilation * Remove last piece
This commit is contained in:
@@ -678,15 +678,12 @@ fn authorities<B, C>(client: &C, at: &BlockId<B>) -> Result<Vec<AuthorityIdFor<B
|
||||
{
|
||||
client
|
||||
.cache()
|
||||
.and_then(|cache| cache.get_at(&well_known_cache_keys::AUTHORITIES, at)
|
||||
.and_then(|v| Decode::decode(&mut &v[..])))
|
||||
.or_else(|| {
|
||||
if client.runtime_api().has_api::<dyn AuthoritiesApi<B>>(at).unwrap_or(false) {
|
||||
AuthoritiesApi::authorities(&*client.runtime_api(), at).ok()
|
||||
} else {
|
||||
CoreApi::authorities(&*client.runtime_api(), at).ok()
|
||||
}
|
||||
}).ok_or_else(|| consensus_common::Error::InvalidAuthoritiesSet.into())
|
||||
.and_then(|cache| cache
|
||||
.get_at(&well_known_cache_keys::AUTHORITIES, at)
|
||||
.and_then(|v| Decode::decode(&mut &v[..]))
|
||||
)
|
||||
.or_else(|| AuthoritiesApi::authorities(&*client.runtime_api(), at).ok())
|
||||
.ok_or_else(|| consensus_common::Error::InvalidAuthoritiesSet.into())
|
||||
}
|
||||
|
||||
/// The Aura import queue type.
|
||||
|
||||
Reference in New Issue
Block a user