mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-10 17:11:03 +00:00
Disabled validators runtime API (#1257)
Exposes disabled validators list via a runtime API. --------- Co-authored-by: ordian <noreply@reusable.software> Co-authored-by: ordian <write@reusable.software>
This commit is contained in:
committed by
GitHub
parent
f0e6d2ad52
commit
7aace06b3d
@@ -346,6 +346,13 @@ impl RuntimeApiSubsystemClient for BlockChainRpcClient {
|
||||
Ok(self.rpc_client.parachain_host_minimum_backing_votes(at, session_index).await?)
|
||||
}
|
||||
|
||||
async fn disabled_validators(
|
||||
&self,
|
||||
at: Hash,
|
||||
) -> Result<Vec<polkadot_primitives::ValidatorIndex>, ApiError> {
|
||||
Ok(self.rpc_client.parachain_host_disabled_validators(at).await?)
|
||||
}
|
||||
|
||||
async fn async_backing_params(&self, at: Hash) -> Result<AsyncBackingParams, ApiError> {
|
||||
Ok(self.rpc_client.parachain_host_async_backing_params(at).await?)
|
||||
}
|
||||
|
||||
@@ -597,6 +597,14 @@ impl RelayChainRpcClient {
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn parachain_host_disabled_validators(
|
||||
&self,
|
||||
at: RelayHash,
|
||||
) -> Result<Vec<ValidatorIndex>, RelayChainError> {
|
||||
self.call_remote_runtime_function("ParachainHost_disabled_validators", at, None::<()>)
|
||||
.await
|
||||
}
|
||||
|
||||
#[allow(missing_docs)]
|
||||
pub async fn parachain_host_async_backing_params(
|
||||
&self,
|
||||
|
||||
@@ -33,7 +33,7 @@ use xcm_emulator::{
|
||||
};
|
||||
|
||||
decl_test_relay_chains! {
|
||||
#[api_version(7)]
|
||||
#[api_version(8)]
|
||||
pub struct Westend {
|
||||
genesis = westend::genesis(),
|
||||
on_init = (),
|
||||
@@ -50,7 +50,7 @@ decl_test_relay_chains! {
|
||||
AssetRate: westend_runtime::AssetRate,
|
||||
}
|
||||
},
|
||||
#[api_version(7)]
|
||||
#[api_version(8)]
|
||||
pub struct Rococo {
|
||||
genesis = rococo::genesis(),
|
||||
on_init = (),
|
||||
@@ -65,7 +65,7 @@ decl_test_relay_chains! {
|
||||
Balances: rococo_runtime::Balances,
|
||||
}
|
||||
},
|
||||
#[api_version(7)]
|
||||
#[api_version(8)]
|
||||
pub struct Wococo {
|
||||
genesis = rococo::genesis(),
|
||||
on_init = (),
|
||||
|
||||
Reference in New Issue
Block a user