domain_client_operator/
utils.rs1use 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#[derive(PartialEq, Clone, Debug)]
10pub struct OperatorSlotInfo {
11 pub slot: Slot,
13 pub proof_of_time: PotOutput,
15}
16
17#[derive(Debug, Clone)]
18pub(crate) struct BlockInfo<Block>
19where
20 Block: BlockT,
21{
22 pub hash: Block::Hash,
24 pub number: NumberFor<Block>,
26 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}