Skip to content

Commit c2005e5

Browse files
committed
rename authority_discovery to authorities
1 parent 502ef95 commit c2005e5

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

examples/async/examples/query_runtime_api.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ async fn main() {
5353
println!("To exceute the balance extrinsic, the following fee is required: {:?}", final_fee);
5454

5555
// Get the authority Ids.
56-
let authority_ids: Vec<sr25519::Public> = runtime_api.authority_discovery(None).await.unwrap();
56+
let authority_ids: Vec<sr25519::Public> = runtime_api.authorities(None).await.unwrap();
5757
println!("The following authorities are currently active:");
5858
for authority in authority_ids {
5959
println!("{:?}", authority);

src/api/runtime_api/authority_discovery.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use codec::Decode;
2222
#[maybe_async::maybe_async(?Send)]
2323
pub trait AuthorityDiscoveryApi: RuntimeApi {
2424
/// Retrieve authority identifiers of the current and next authority set.
25-
async fn authority_discovery<AuthorityId: Decode>(
25+
async fn authorities<AuthorityId: Decode>(
2626
&self,
2727
at_block: Option<Self::Hash>,
2828
) -> Result<Vec<AuthorityId>>;
@@ -34,7 +34,7 @@ where
3434
T: Config,
3535
Client: Request,
3636
{
37-
async fn authority_discovery<AuthorityId: Decode>(
37+
async fn authorities<AuthorityId: Decode>(
3838
&self,
3939
at_block: Option<Self::Hash>,
4040
) -> Result<Vec<AuthorityId>> {

testing/async/examples/runtime_api_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ async fn main() {
5151
assert_eq!(alice_nonce, api.get_nonce().await.unwrap());
5252

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

5757
// BlockBuilder

0 commit comments

Comments
 (0)