Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
fn staging_get_session_disputes() is renamed to fn staging_get_disput…
Browse files Browse the repository at this point in the history
…es()
  • Loading branch information
tdimitrov committed Apr 12, 2022
1 parent 43ed02f commit 2f84976
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion node/core/runtime-api/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ sp_api::mock_impl_runtime_apis! {
self.validation_code_hash.get(&para).map(|c| c.clone())
}

fn staging_get_session_disputes() -> Vec<(SessionIndex, CandidateHash, DisputeState<BlockNumber>)> {
fn staging_get_disputes() -> Vec<(SessionIndex, CandidateHash, DisputeState<BlockNumber>)> {
unimplemented!()
}
}
Expand Down
7 changes: 3 additions & 4 deletions primitives/src/runtime_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
//! On the other hand a staging function's name should be prefixed with
//! `staging_` like this:
//! ```ignore
//! fn staging_get_session_disputes() -> Vec<(vstaging::SessionIndex, vstaging::CandidateHash, vstaging::DisputeState<vstaging::BlockNumber>)>;
//! fn staging_get_disputes() -> Vec<(vstaging::SessionIndex, vstaging::CandidateHash, vstaging::DisputeState<vstaging::BlockNumber>)>;
//! ```
//!
//! How a staging function becomes stable?
Expand Down Expand Up @@ -153,8 +153,7 @@ sp_api::decl_runtime_apis! {
/***** STAGING *****/

/// Returns all onchain disputes.
///
/// NOTE: This function is only available since parachain host version 2.
fn staging_get_session_disputes() -> Vec<(v2::SessionIndex, v2::CandidateHash, v2::DisputeState<v2::BlockNumber>)>;
/// This is a staging method! Do not use on production runtimes!
fn staging_get_disputes() -> Vec<(v2::SessionIndex, v2::CandidateHash, v2::DisputeState<v2::BlockNumber>)>;
}
}
2 changes: 1 addition & 1 deletion runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1760,7 +1760,7 @@ sp_api::impl_runtime_apis! {
parachains_runtime_api_impl::validation_code_hash::<Runtime>(para_id, assumption)
}

fn staging_get_session_disputes() -> Vec<(SessionIndex, CandidateHash, DisputeState<BlockNumber>)> {
fn staging_get_disputes() -> Vec<(SessionIndex, CandidateHash, DisputeState<BlockNumber>)> {
unimplemented!()
}
}
Expand Down
2 changes: 1 addition & 1 deletion runtime/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1908,7 +1908,7 @@ sp_api::impl_runtime_apis! {
parachains_runtime_api_impl::validation_code_hash::<Runtime>(para_id, assumption)
}

fn staging_get_session_disputes() -> Vec<(SessionIndex, CandidateHash, DisputeState<BlockNumber>)> {
fn staging_get_disputes() -> Vec<(SessionIndex, CandidateHash, DisputeState<BlockNumber>)> {
unimplemented!()
}
}
Expand Down
2 changes: 1 addition & 1 deletion runtime/rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,7 @@ sp_api::impl_runtime_apis! {
runtime_api_impl::validation_code_hash::<Runtime>(para_id, assumption)
}

fn staging_get_session_disputes() -> Vec<(SessionIndex, CandidateHash, DisputeState<BlockNumber>)> {
fn staging_get_disputes() -> Vec<(SessionIndex, CandidateHash, DisputeState<BlockNumber>)> {
unimplemented!()
}
}
Expand Down
2 changes: 1 addition & 1 deletion runtime/test-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ sp_api::impl_runtime_apis! {
runtime_impl::validation_code_hash::<Runtime>(para_id, assumption)
}

fn staging_get_session_disputes() -> Vec<(SessionIndex, CandidateHash, DisputeState<BlockNumber>)> {
fn staging_get_disputes() -> Vec<(SessionIndex, CandidateHash, DisputeState<BlockNumber>)> {
polkadot_runtime_parachains::runtime_api_impl::vstaging::get_session_disputes::<Runtime>()
}
}
Expand Down
2 changes: 1 addition & 1 deletion runtime/westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1314,7 +1314,7 @@ sp_api::impl_runtime_apis! {
parachains_runtime_api_impl::validation_code_hash::<Runtime>(para_id, assumption)
}

fn staging_get_session_disputes() -> Vec<(SessionIndex, CandidateHash, DisputeState<BlockNumber>)> {
fn staging_get_disputes() -> Vec<(SessionIndex, CandidateHash, DisputeState<BlockNumber>)> {
runtime_parachains::runtime_api_impl::vstaging::get_session_disputes::<Runtime>()
}
}
Expand Down

0 comments on commit 2f84976

Please sign in to comment.