move AssignmentKind and CoreAssigment to scheduler (#1571)

This commit is contained in:
Andronik Ordian
2020-08-17 19:26:13 +02:00
committed by GitHub
parent ed616e4b29
commit dffefac54e
4 changed files with 53 additions and 65 deletions
+1 -14
View File
@@ -33,7 +33,7 @@ use polkadot_node_primitives::{
use polkadot_primitives::v1::{
AvailableData, BackedCandidate, BlockNumber, CandidateDescriptor, CandidateEvent,
CandidateReceipt, CollatorId, CommittedCandidateReceipt,
CoreAssignment, CoreOccupied, CoreState, ErasureChunk, GlobalValidationData, GroupRotationInfo,
CoreState, ErasureChunk, GlobalValidationData, GroupRotationInfo,
Hash, Id as ParaId, LocalValidationData, OccupiedCoreAssumption, OmittedValidationData, PoV,
SessionIndex, SignedAvailabilityBitfield, ValidationCode, ValidatorId, ValidatorIndex,
ValidatorSignature,
@@ -345,19 +345,6 @@ impl ChainApiMessage {
}
}
/// The information on scheduler assignments that some somesystems may be querying.
#[derive(Debug, Clone)]
pub struct SchedulerRoster {
/// Validator-to-groups assignments.
pub validator_groups: Vec<Vec<ValidatorIndex>>,
/// All scheduled paras.
pub scheduled: Vec<CoreAssignment>,
/// Upcoming paras (chains and threads).
pub upcoming: Vec<ParaId>,
/// Occupied cores.
pub availability_cores: Vec<Option<CoreOccupied>>,
}
/// A sender for the result of a runtime API request.
pub type RuntimeApiSender<T> = oneshot::Sender<Result<T, crate::errors::RuntimeApiError>>;