Migrate polkadot-primitives to v6 (#1543)

- Async-backing related primitives are stable `primitives::v6`
- Async-backing API is now part of `api_version(7)`
- It's enabled on Rococo and Westend runtimes

---------

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Co-authored-by: Andrei Sandu <54316454+sandreim@users.noreply.github.com>
This commit is contained in:
Chris Sosnin
2023-09-27 13:32:02 +03:00
committed by GitHub
parent 5a2833cceb
commit 7cbe0c76ef
107 changed files with 2410 additions and 2792 deletions
+1 -1
View File
@@ -237,7 +237,7 @@ async fn test_startup(virtual_overseer: &mut VirtualOverseer, test_state: &TestS
assert_matches!(
virtual_overseer.recv().await,
AllMessages::RuntimeApi(
RuntimeApiMessage::Request(parent, RuntimeApiRequest::StagingAsyncBackingParams(tx))
RuntimeApiMessage::Request(parent, RuntimeApiRequest::AsyncBackingParams(tx))
) if parent == test_state.relay_parent => {
tx.send(Err(ASYNC_BACKING_DISABLED_ERROR)).unwrap();
}
@@ -20,12 +20,12 @@ use polkadot_node_subsystem::{
messages::{ChainApiMessage, FragmentTreeMembership},
ActivatedLeaf, TimeoutExt,
};
use polkadot_primitives::{vstaging as vstaging_primitives, BlockNumber, Header, OccupiedCore};
use polkadot_primitives::{AsyncBackingParams, BlockNumber, Header, OccupiedCore};
use super::*;
const ASYNC_BACKING_PARAMETERS: vstaging_primitives::AsyncBackingParams =
vstaging_primitives::AsyncBackingParams { max_candidate_depth: 4, allowed_ancestry_len: 3 };
const ASYNC_BACKING_PARAMETERS: AsyncBackingParams =
AsyncBackingParams { max_candidate_depth: 4, allowed_ancestry_len: 3 };
struct TestLeaf {
activated: ActivatedLeaf,
@@ -56,7 +56,7 @@ async fn activate_leaf(
assert_matches!(
virtual_overseer.recv().await,
AllMessages::RuntimeApi(
RuntimeApiMessage::Request(parent, RuntimeApiRequest::StagingAsyncBackingParams(tx))
RuntimeApiMessage::Request(parent, RuntimeApiRequest::AsyncBackingParams(tx))
) if parent == leaf_hash => {
tx.send(Ok(ASYNC_BACKING_PARAMETERS)).unwrap();
}