-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathconfig.rs
More file actions
30 lines (23 loc) · 849 Bytes
/
config.rs
File metadata and controls
30 lines (23 loc) · 849 Bytes
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
use commonware_consensus::types::Epocher;
#[cfg(feature = "permissioned")]
use std::sync::Arc;
#[cfg(feature = "permissioned")]
use std::sync::atomic::AtomicBool;
use summit_types::EngineClient;
use tokio_util::sync::CancellationToken;
#[derive(Clone)]
pub struct ApplicationConfig<C: EngineClient, ES: Epocher> {
pub engine_client: C,
/// Number of messages from consensus to hold in our backlog
/// before blocking.
pub mailbox_size: usize,
pub partition_prefix: String,
pub genesis_hash: [u8; 32],
/// Epocher for determining epoch boundaries.
pub epocher: ES,
pub cancellation_token: CancellationToken,
/// When true, the node will not participate in consensus
/// (skip proposals, reject verifications, skip broadcasts).
#[cfg(feature = "permissioned")]
pub paused: Arc<AtomicBool>,
}