1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Copyright (c) 2021, Facebook, Inc. and its affiliates
// Copyright (c) 2022, Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
#![warn(
    future_incompatible,
    nonstandard_style,
    rust_2018_idioms,
    rust_2021_compatibility
)]

mod aggregators;
mod block_remover;
pub mod block_synchronizer;
mod block_waiter;
mod certificate_waiter;
mod core;
mod grpc_server;
mod header_waiter;
mod helper;
mod payload_receiver;
mod primary;
mod proposer;
mod state_handler;
mod synchronizer;
mod utils;

#[cfg(test)]
#[path = "tests/common.rs"]
mod common;
mod metrics;

#[cfg(test)]
#[path = "tests/certificate_tests.rs"]
mod certificate_tests;

pub use crate::{
    block_remover::{BlockRemover, BlockRemoverCommand, DeleteBatchMessage},
    block_synchronizer::{
        mock::MockBlockSynchronizer,
        responses::{CertificatesResponse, PayloadAvailabilityResponse},
        BlockHeader,
    },
    block_waiter::{BlockCommand, BlockWaiter, GetBlockResponse},
    grpc_server::metrics::EndpointMetrics,
    metrics::PrimaryChannelMetrics,
    primary::{NetworkModel, PayloadToken, Primary, PrimaryWorkerMessage, CHANNEL_CAPACITY},
};