// Copyright (C) Parity Technologies (UK) Ltd.
// This file is part of Pezcumulus.
// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0
// Pezcumulus is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Pezcumulus is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Pezcumulus. If not, see .
//! Pezcumulus Collator implementation for Bizinikiwi.
use pezkuwi_node_primitives::CollationGenerationConfig;
use pezkuwi_node_subsystem::messages::{CollationGenerationMessage, CollatorProtocolMessage};
use pezkuwi_overseer::Handle as OverseerHandle;
use pezkuwi_primitives::{CollatorPair, Id as ParaId};
pub mod service;
/// Relay-chain-driven collators are those whose block production is driven purely
/// by new relay chain blocks and the most recently included teyrchain blocks
/// within them.
///
/// This method of driving collators is not suited to anything but the most simple teyrchain
/// consensus mechanisms, and this module may soon be deprecated.
pub mod relay_chain_driven {
use futures::{
channel::{mpsc, oneshot},
prelude::*,
};
use pezkuwi_node_primitives::{CollationGenerationConfig, CollationResult};
use pezkuwi_node_subsystem::messages::{CollationGenerationMessage, CollatorProtocolMessage};
use pezkuwi_overseer::Handle as OverseerHandle;
use pezkuwi_primitives::{CollatorPair, Id as ParaId};
use cumulus_primitives_core::{relay_chain::Hash as PHash, PersistedValidationData};
/// A request to author a collation, based on the advancement of the relay chain.
///
/// See the module docs for more info on relay-chain-driven collators.
pub struct CollationRequest {
relay_parent: PHash,
pvd: PersistedValidationData,
sender: oneshot::Sender