Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[async_backing] Bump ParachainHost to api version 10 on polkadot #222

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use emulated_integration_tests_common::{
impl_hrmp_channels_helpers_for_relay_chain, impl_send_transact_helpers_for_relay_chain,
xcm_emulator::decl_test_relay_chains,
};
use polkadot_primitives::runtime_api::runtime_decl_for_parachain_host::ParachainHostV5;
alexggh marked this conversation as resolved.
Show resolved Hide resolved
use polkadot_primitives::runtime_api::runtime_decl_for_parachain_host::ParachainHostV7;

// Polkadot declaration
decl_test_relay_chains! {
Expand Down
13 changes: 13 additions & 0 deletions relay/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1971,6 +1971,7 @@ sp_api::impl_runtime_apis! {
}
}

#[api_version(7)]
impl primitives::runtime_api::ParachainHost<Block> for Runtime {
fn validators() -> Vec<ValidatorId> {
parachains_runtime_api_impl::validators::<Runtime>()
Expand Down Expand Up @@ -2101,6 +2102,18 @@ sp_api::impl_runtime_apis! {
key_ownership_proof,
)
}

fn minimum_backing_votes() -> u32 {
parachains_runtime_api_impl::minimum_backing_votes::<Runtime>()
}

fn para_backing_state(para_id: ParaId) -> Option<primitives::async_backing::BackingState> {
parachains_runtime_api_impl::backing_state::<Runtime>(para_id)
}

fn async_backing_params() -> primitives::AsyncBackingParams {
parachains_runtime_api_impl::async_backing_params::<Runtime>()
}
}

impl beefy_primitives::BeefyApi<Block, BeefyId> for Runtime {
Expand Down
Loading