Skip to main content

commonware_broadcast/buffered/
config.rs

1use commonware_cryptography::PublicKey;
2use commonware_p2p::Provider;
3
4/// Configuration for the [super::Engine].
5pub struct Config<P: PublicKey, MCfg, D: Provider<PublicKey = P>> {
6    /// The public key of the participant.
7    pub public_key: P,
8
9    /// The maximum size of the mailbox backlog.
10    pub mailbox_size: usize,
11
12    /// The maximum number of cached items per sender.
13    pub deque_size: usize,
14
15    /// Whether messages are sent over the network as priority.
16    pub priority: bool,
17
18    /// The configuration for the codec item.
19    pub codec_config: MCfg,
20
21    /// Provider for peer set changes. Per-peer caches are freed when a
22    /// peer leaves all tracked peer sets.
23    pub peer_provider: D,
24}