pub struct GossipConfig {
pub enabled: bool,
pub target_fanout: usize,
pub min_probability: f32,
pub small_network_threshold: usize,
pub priority_bypass: bool,
}Expand description
Gossip forwarding configuration for probabilistic message propagation.
Fields§
§enabled: boolEnable probabilistic (gossip) forwarding to prevent broadcast storms.
target_fanout: usizeTarget number of peers to forward to in large networks. The actual forwarding probability is computed as: min(1.0, target_fanout / visible_peers)
min_probability: f32Minimum forwarding probability (0.0-1.0). Ensures messages still propagate even in very dense networks.
small_network_threshold: usizePeer count threshold below which we always forward (no probabilistic dropping). Below this threshold, the network is small enough to handle full flooding.
priority_bypass: boolHigh-priority messages bypass probabilistic dropping.
Trait Implementations§
Source§impl Clone for GossipConfig
impl Clone for GossipConfig
Source§fn clone(&self) -> GossipConfig
fn clone(&self) -> GossipConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GossipConfig
impl Debug for GossipConfig
Auto Trait Implementations§
impl Freeze for GossipConfig
impl RefUnwindSafe for GossipConfig
impl Send for GossipConfig
impl Sync for GossipConfig
impl Unpin for GossipConfig
impl UnsafeUnpin for GossipConfig
impl UnwindSafe for GossipConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more