Skip to content

Commit

Permalink
rename authority_discovery to authorities
Browse files Browse the repository at this point in the history
  • Loading branch information
haerdib committed Feb 15, 2024
1 parent 0acf8bd commit 4dd039f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/async/examples/query_runtime_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ async fn main() {
println!("To exceute the balance extrinsic, the following fee is required: {:?}", final_fee);

// Get the authority Ids.
let authority_ids: Vec<sr25519::Public> = runtime_api.authority_discovery(None).await.unwrap();
let authority_ids: Vec<sr25519::Public> = runtime_api.authorities(None).await.unwrap();
println!("The following authorities are currently active:");
for authority in authority_ids {
println!("{:?}", authority);
Expand Down
4 changes: 2 additions & 2 deletions src/api/runtime_api/authority_discovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use codec::Decode;
#[maybe_async::maybe_async(?Send)]
pub trait AuthorityDiscoveryApi: RuntimeApi {
/// Retrieve authority identifiers of the current and next authority set.
async fn authority_discovery<AuthorityId: Decode>(
async fn authorities<AuthorityId: Decode>(
&self,
at_block: Option<Self::Hash>,
) -> Result<Vec<AuthorityId>>;
Expand All @@ -34,7 +34,7 @@ where
T: Config,
Client: Request,
{
async fn authority_discovery<AuthorityId: Decode>(
async fn authorities<AuthorityId: Decode>(
&self,
at_block: Option<Self::Hash>,
) -> Result<Vec<AuthorityId>> {
Expand Down
2 changes: 1 addition & 1 deletion testing/async/examples/runtime_api_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async fn main() {
assert_eq!(alice_nonce, api.get_nonce().await.unwrap());

// Authority Discovery
let authority_id: Vec<sr25519::Public> = runtime_api.authority_discovery(None).await.unwrap();
let authority_id: Vec<sr25519::Public> = runtime_api.authorities(None).await.unwrap();
assert!(authority_id.len() > 0);

// BlockBuilder
Expand Down

0 comments on commit 4dd039f

Please sign in to comment.