mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-13 12:45:50 +00:00
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:
@@ -25,7 +25,7 @@ use polkadot_node_subsystem::{
|
||||
};
|
||||
use polkadot_node_subsystem_test_helpers as test_helpers;
|
||||
use polkadot_primitives::{
|
||||
vstaging::{AsyncBackingParams, BackingState, Constraints, InboundHrmpLimitations},
|
||||
async_backing::{AsyncBackingParams, BackingState, Constraints, InboundHrmpLimitations},
|
||||
CommittedCandidateReceipt, HeadData, Header, PersistedValidationData, ScheduledCore,
|
||||
ValidationCodeHash,
|
||||
};
|
||||
@@ -219,7 +219,7 @@ async fn handle_leaf_activation(
|
||||
assert_matches!(
|
||||
virtual_overseer.recv().await,
|
||||
AllMessages::RuntimeApi(
|
||||
RuntimeApiMessage::Request(parent, RuntimeApiRequest::StagingAsyncBackingParams(tx))
|
||||
RuntimeApiMessage::Request(parent, RuntimeApiRequest::AsyncBackingParams(tx))
|
||||
) if parent == *hash => {
|
||||
tx.send(Ok(async_backing_params)).unwrap();
|
||||
}
|
||||
@@ -284,7 +284,7 @@ async fn handle_leaf_activation(
|
||||
let para_id = match message {
|
||||
AllMessages::RuntimeApi(RuntimeApiMessage::Request(
|
||||
_,
|
||||
RuntimeApiRequest::StagingParaBackingState(p_id, _),
|
||||
RuntimeApiRequest::ParaBackingState(p_id, _),
|
||||
)) => p_id,
|
||||
_ => panic!("received unexpected message {:?}", message),
|
||||
};
|
||||
@@ -303,7 +303,7 @@ async fn handle_leaf_activation(
|
||||
assert_matches!(
|
||||
message,
|
||||
AllMessages::RuntimeApi(
|
||||
RuntimeApiMessage::Request(parent, RuntimeApiRequest::StagingParaBackingState(p_id, tx))
|
||||
RuntimeApiMessage::Request(parent, RuntimeApiRequest::ParaBackingState(p_id, tx))
|
||||
) if parent == *hash && p_id == para_id => {
|
||||
tx.send(Ok(Some(backing_state))).unwrap();
|
||||
}
|
||||
@@ -499,7 +499,7 @@ fn should_do_no_work_if_async_backing_disabled_for_leaf() {
|
||||
assert_matches!(
|
||||
virtual_overseer.recv().await,
|
||||
AllMessages::RuntimeApi(
|
||||
RuntimeApiMessage::Request(parent, RuntimeApiRequest::StagingAsyncBackingParams(tx))
|
||||
RuntimeApiMessage::Request(parent, RuntimeApiRequest::AsyncBackingParams(tx))
|
||||
) if parent == hash => {
|
||||
tx.send(Err(ASYNC_BACKING_DISABLED_ERROR)).unwrap();
|
||||
}
|
||||
@@ -1569,7 +1569,7 @@ fn uses_ancestry_only_within_session() {
|
||||
assert_matches!(
|
||||
virtual_overseer.recv().await,
|
||||
AllMessages::RuntimeApi(
|
||||
RuntimeApiMessage::Request(parent, RuntimeApiRequest::StagingAsyncBackingParams(tx))
|
||||
RuntimeApiMessage::Request(parent, RuntimeApiRequest::AsyncBackingParams(tx))
|
||||
) if parent == hash => {
|
||||
tx.send(Ok(AsyncBackingParams { max_candidate_depth: 0, allowed_ancestry_len: ancestry_len })).unwrap();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user