domain_client_operator/
utils.rs

1use parking_lot::Mutex;
2use sc_utils::mpsc::TracingUnboundedSender;
3use sp_consensus_slots::Slot;
4use sp_runtime::traits::{Block as BlockT, NumberFor};
5use std::sync::Arc;
6use subspace_core_primitives::pot::PotOutput;
7
8/// Data required to produce bundles on executor node.
9#[derive(PartialEq, Clone, Debug)]
10pub struct OperatorSlotInfo {
11    /// Slot
12    pub slot: Slot,
13    /// The PoT output for `slot`
14    pub proof_of_time: PotOutput,
15}
16
17#[derive(Debug, Clone)]
18pub(crate) struct BlockInfo<Block>
19where
20    Block: BlockT,
21{
22    /// hash of the block.
23    pub hash: Block::Hash,
24    /// block's number.
25    pub number: NumberFor<Block>,
26    /// Is this the new best block.
27    pub is_new_best: bool,
28}
29
30pub type DomainImportNotificationSinks<Block, CBlock> =
31    Arc<Mutex<Vec<TracingUnboundedSender<DomainBlockImportNotification<Block, CBlock>>>>>;
32
33#[derive(Clone, Debug)]
34pub struct DomainBlockImportNotification<Block: BlockT, CBlock: BlockT> {
35    pub domain_block_hash: Block::Hash,
36    pub consensus_block_hash: CBlock::Hash,
37}