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

Commit

Permalink
Finalize subsuming Candidate Selection
Browse files Browse the repository at this point in the history
  • Loading branch information
noone authored and Lldenaurois committed May 31, 2021
1 parent 464c9af commit 6e76d3a
Show file tree
Hide file tree
Showing 15 changed files with 309 additions and 1,162 deletions.
17 changes: 0 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ members = [
"node/core/av-store",
"node/core/backing",
"node/core/bitfield-signing",
"node/core/candidate-selection",
"node/core/candidate-validation",
"node/core/chain-api",
"node/core/parachains-inherent",
Expand Down
20 changes: 10 additions & 10 deletions node/core/backing/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ use polkadot_subsystem::{
jaeger,
messages::{
AllMessages, AvailabilityDistributionMessage, AvailabilityStoreMessage,
CandidateBackingMessage, CandidateSelectionMessage, CandidateValidationMessage,
CandidateBackingMessage, CandidateValidationMessage, CollatorProtocolMessage,
ProvisionableData, ProvisionerMessage, RuntimeApiRequest,
StatementDistributionMessage, ValidationFailed
}
Expand Down Expand Up @@ -600,14 +600,14 @@ impl CandidateBackingJob {
root_span,
).await? {
sender.send_message(
CandidateSelectionMessage::Seconded(self.parent, stmt).into()
CollatorProtocolMessage::Seconded(self.parent, stmt).into()
).await;
}
}
}
Err(candidate) => {
sender.send_message(
CandidateSelectionMessage::Invalid(self.parent, candidate).into()
CollatorProtocolMessage::Invalid(self.parent, candidate).into()
).await;
}
}
Expand Down Expand Up @@ -685,7 +685,7 @@ impl CandidateBackingJob {
.map_or(false, |c| c != &candidate.descriptor().collator)
{
sender.send_message(
CandidateSelectionMessage::Invalid(self.parent, candidate.clone()).into()
CollatorProtocolMessage::Invalid(self.parent, candidate.clone()).into()
).await;
return Ok(());
}
Expand Down Expand Up @@ -1332,7 +1332,7 @@ mod tests {
use futures::{future, Future};
use polkadot_primitives::v1::{GroupRotationInfo, HeadData, PersistedValidationData, ScheduledCore};
use polkadot_subsystem::{
messages::{RuntimeApiRequest, RuntimeApiMessage},
messages::{RuntimeApiRequest, RuntimeApiMessage, CollatorProtocolMessage},
ActiveLeavesUpdate, FromOverseer, OverseerSignal, ActivatedLeaf, LeafStatus,
};
use polkadot_node_primitives::{InvalidCandidate, BlockData};
Expand Down Expand Up @@ -1648,7 +1648,7 @@ mod tests {

assert_matches!(
virtual_overseer.recv().await,
AllMessages::CandidateSelection(CandidateSelectionMessage::Seconded(hash, statement)) => {
AllMessages::CollatorProtocol(CollatorProtocolMessage::Seconded(hash, statement)) => {
assert_eq!(test_state.relay_parent, hash);
assert_matches!(statement.payload(), Statement::Seconded(_));
}
Expand Down Expand Up @@ -2172,8 +2172,8 @@ mod tests {

assert_matches!(
virtual_overseer.recv().await,
AllMessages::CandidateSelection(
CandidateSelectionMessage::Invalid(parent_hash, c)
AllMessages::CollatorProtocol(
CollatorProtocolMessage::Invalid(parent_hash, c)
) if parent_hash == test_state.relay_parent && c == candidate_a.to_plain()
);

Expand Down Expand Up @@ -2482,8 +2482,8 @@ mod tests {

assert_matches!(
virtual_overseer.recv().await,
AllMessages::CandidateSelection(
CandidateSelectionMessage::Invalid(parent, c)
AllMessages::CollatorProtocol(
CollatorProtocolMessage::Invalid(parent, c)
) if parent == test_state.relay_parent && c == candidate.to_plain() => {
}
);
Expand Down
21 changes: 0 additions & 21 deletions node/core/candidate-selection/Cargo.toml

This file was deleted.

Loading

0 comments on commit 6e76d3a

Please sign in to comment.