Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Change FetchCollations back to FetchCollation
  • Loading branch information
montekki committed Sep 9, 2020
commit 36745f6f4fe51f05bcf939ffedd9734fcc3a5e88
13 changes: 11 additions & 2 deletions node/core/candidate-selection/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,12 @@ impl CandidateSelectionJob {
) {
if self.seconded_candidate.is_none() {
let (candidate_receipt, pov) =
match get_collation(relay_parent, para_id, self.sender.clone()).await {
match get_collation(
relay_parent,
para_id,
collator_id.clone(),
self.sender.clone(),
).await {
Ok(response) => response,
Err(err) => {
log::warn!(
Expand Down Expand Up @@ -296,12 +301,14 @@ impl CandidateSelectionJob {
async fn get_collation(
relay_parent: Hash,
para_id: ParaId,
collator_id: CollatorId,
mut sender: mpsc::Sender<FromJob>,
) -> Result<(CandidateReceipt, PoV), Error> {
let (tx, rx) = oneshot::channel();
sender
.send(FromJob::Collator(CollatorProtocolMessage::FetchCollation(
relay_parent,
collator_id,
para_id,
tx,
)))
Expand Down Expand Up @@ -514,7 +521,7 @@ mod tests {
CandidateSelectionMessage::Collation(
relay_parent,
para_id,
collator_id_clone,
collator_id_clone.clone(),
),
))
.await
Expand All @@ -525,11 +532,13 @@ mod tests {
match msg {
FromJob::Collator(CollatorProtocolMessage::FetchCollation(
got_relay_parent,
collator_id,
got_para_id,
return_sender,
)) => {
assert_eq!(got_relay_parent, relay_parent);
assert_eq!(got_para_id, para_id);
assert_eq!(collator_id, collator_id_clone);

return_sender
.send((candidate_receipt.clone(), pov.clone()))
Expand Down
2 changes: 1 addition & 1 deletion node/network/collator-protocol/src/collator_side.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ where
}
}
}
FetchCollations(_, _, _) => {
FetchCollation(_, _, _, _) => {
warn!(
target: TARGET,
"FetchCollation message is not expected on the collator side of the protocol",
Expand Down
Loading