mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 12:17:58 +00:00
Collator protocol subsystem (#1659)
* WIP * The initial implementation of the collator side. * Improve comments * Multiple collation requests * Add more tests and comments to validator side * Add comments, remove dead code * Apply suggestions from code review Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com> * Fix build after suggested changes * Also connect to the next validator group * Remove a Future impl and move TimeoutExt to util * Minor nits * Fix build * Change FetchCollations back to FetchCollation * Try this * Final fixes * Fix build Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
This commit is contained in:
@@ -160,7 +160,7 @@ pub enum CollatorProtocolMessage {
|
||||
/// Provide a collation to distribute to validators.
|
||||
DistributeCollation(CandidateReceipt, PoV),
|
||||
/// Fetch a collation under the given relay-parent for the given ParaId.
|
||||
FetchCollation(Hash, ParaId, oneshot::Sender<(CandidateReceipt, PoV)>),
|
||||
FetchCollation(Hash, CollatorId, ParaId, oneshot::Sender<(CandidateReceipt, PoV)>),
|
||||
/// Report a collator as having provided an invalid collation. This should lead to disconnect
|
||||
/// and blacklist of the collator.
|
||||
ReportCollator(CollatorId),
|
||||
@@ -176,7 +176,7 @@ impl CollatorProtocolMessage {
|
||||
match self {
|
||||
Self::CollateOn(_) => None,
|
||||
Self::DistributeCollation(receipt, _) => Some(receipt.descriptor().relay_parent),
|
||||
Self::FetchCollation(relay_parent, _, _) => Some(*relay_parent),
|
||||
Self::FetchCollation(relay_parent, _, _, _) => Some(*relay_parent),
|
||||
Self::ReportCollator(_) => None,
|
||||
Self::NoteGoodCollation(_) => None,
|
||||
Self::NetworkBridgeUpdateV1(_) => None,
|
||||
|
||||
Reference in New Issue
Block a user