Skip to content

Commit

Permalink
Set some versions
Browse files Browse the repository at this point in the history
  • Loading branch information
tdimitrov committed Jul 11, 2022
1 parent c16bfc3 commit 7eda509
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion node/core/runtime-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,6 @@ where
Request::ValidationCodeHash(para, assumption, sender) =>
query!(ValidationCodeHash, validation_code_hash(para, assumption), ver = 2, sender),
Request::StagingDisputes(sender) =>
query!(StagingDisputes, staging_get_disputes(), ver = 2, sender),
query!(StagingDisputes, staging_get_disputes(), ver = 3, sender),
}
}
1 change: 1 addition & 0 deletions primitives/src/runtime_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ sp_api::decl_runtime_apis! {

/// Returns all onchain disputes.
/// This is a staging method! Do not use on production runtimes!
#[api_version(3)]
fn staging_get_disputes() -> Vec<(v2::SessionIndex, v2::CandidateHash, v2::DisputeState<v2::BlockNumber>)>;
}
}
5 changes: 1 addition & 4 deletions runtime/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1632,6 +1632,7 @@ sp_api::impl_runtime_apis! {
}
}

#[api_version(2)]
impl primitives::runtime_api::ParachainHost<Block, Hash, BlockNumber> for Runtime {
fn validators() -> Vec<ValidatorId> {
parachains_runtime_api_impl::validators::<Runtime>()
Expand Down Expand Up @@ -1729,10 +1730,6 @@ sp_api::impl_runtime_apis! {
{
parachains_runtime_api_impl::validation_code_hash::<Runtime>(para_id, assumption)
}

fn staging_get_disputes() -> Vec<(SessionIndex, CandidateHash, DisputeState<BlockNumber>)> {
unimplemented!()
}
}

impl beefy_primitives::BeefyApi<Block> for Runtime {
Expand Down
1 change: 1 addition & 0 deletions runtime/rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1017,6 +1017,7 @@ sp_api::impl_runtime_apis! {
}
}

#[api_version(3)]
impl primitives::runtime_api::ParachainHost<Block, Hash, BlockNumber> for Runtime {
fn validators() -> Vec<ValidatorId> {
runtime_api_impl::validators::<Runtime>()
Expand Down

0 comments on commit 7eda509

Please sign in to comment.