mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 00:31:02 +00:00
Runtime API: introduce candidates_pending_availability (#4027)
Fixes https://github.com/paritytech/polkadot-sdk/issues/3576 Required by elastic scaling collators. Deprecates old API: `candidate_pending_availability`. TODO: - [x] PRDoc --------- Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
This commit is contained in:
@@ -451,6 +451,17 @@ impl RuntimeApiSubsystemClient for BlockChainRpcClient {
|
||||
) -> Result<BTreeMap<CoreIndex, VecDeque<cumulus_primitives_core::ParaId>>, ApiError> {
|
||||
Ok(self.rpc_client.parachain_host_claim_queue(at).await?)
|
||||
}
|
||||
|
||||
async fn candidates_pending_availability(
|
||||
&self,
|
||||
at: Hash,
|
||||
para_id: cumulus_primitives_core::ParaId,
|
||||
) -> Result<Vec<polkadot_primitives::CommittedCandidateReceipt<Hash>>, sp_api::ApiError> {
|
||||
Ok(self
|
||||
.rpc_client
|
||||
.parachain_host_candidates_pending_availability(at, para_id)
|
||||
.await?)
|
||||
}
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
||||
@@ -655,6 +655,20 @@ impl RelayChainRpcClient {
|
||||
.await
|
||||
}
|
||||
|
||||
/// Get the receipt of all candidates pending availability.
|
||||
pub async fn parachain_host_candidates_pending_availability(
|
||||
&self,
|
||||
at: RelayHash,
|
||||
para_id: ParaId,
|
||||
) -> Result<Vec<CommittedCandidateReceipt>, RelayChainError> {
|
||||
self.call_remote_runtime_function(
|
||||
"ParachainHost_candidates_pending_availability",
|
||||
at,
|
||||
Some(para_id),
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn validation_code_hash(
|
||||
&self,
|
||||
at: RelayHash,
|
||||
|
||||
Reference in New Issue
Block a user