mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-20 20:55:41 +00:00
Break cycle collator-procol - backing (#5883)
This commit is contained in:
@@ -811,17 +811,22 @@ impl<Context> CandidateBackingJob<Context> {
|
|||||||
.sign_import_and_distribute_statement(ctx, statement, root_span)
|
.sign_import_and_distribute_statement(ctx, statement, root_span)
|
||||||
.await?
|
.await?
|
||||||
{
|
{
|
||||||
ctx.send_message(CollatorProtocolMessage::Seconded(
|
// Break cycle - bounded as there is only one candidate to
|
||||||
|
// second per block.
|
||||||
|
ctx.send_unbounded_message(CollatorProtocolMessage::Seconded(
|
||||||
self.parent,
|
self.parent,
|
||||||
stmt,
|
stmt,
|
||||||
))
|
));
|
||||||
.await;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Err(candidate) => {
|
Err(candidate) => {
|
||||||
ctx.send_message(CollatorProtocolMessage::Invalid(self.parent, candidate))
|
// Break cycle - bounded as there is only one candidate to
|
||||||
.await;
|
// second per block.
|
||||||
|
ctx.send_unbounded_message(CollatorProtocolMessage::Invalid(
|
||||||
|
self.parent,
|
||||||
|
candidate,
|
||||||
|
));
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -911,8 +916,12 @@ impl<Context> CandidateBackingJob<Context> {
|
|||||||
.as_ref()
|
.as_ref()
|
||||||
.map_or(false, |c| c != &candidate.descriptor().collator)
|
.map_or(false, |c| c != &candidate.descriptor().collator)
|
||||||
{
|
{
|
||||||
ctx.send_message(CollatorProtocolMessage::Invalid(self.parent, candidate.clone()))
|
// Break cycle - bounded as there is only one candidate to
|
||||||
.await;
|
// second per block.
|
||||||
|
ctx.send_unbounded_message(CollatorProtocolMessage::Invalid(
|
||||||
|
self.parent,
|
||||||
|
candidate.clone(),
|
||||||
|
));
|
||||||
return Ok(())
|
return Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user