pub struct BroadcastConfig {
pub outgoing_interval_s: Option<u64>,
pub watch_incoming: bool,
pub min_peer_interval_s: u64,
pub peer_cleanup: PeerCleanupConfig,
}Expand description
Identity-broadcast policy.
Broadcasts are routed PeerInfo control frames sent to every node
in the local routing table — they let multi-hop peers learn each
other’s node_id + x25519_pubkey without an out-of-band exchange.
Fields§
§outgoing_interval_s: Option<u64>Cadence between scheduled outbound broadcast cycles, in seconds.
None (or omitted) disables the periodic task; one-shot
peers.broadcast_identity_now calls still work. Values below
MIN_OUTGOING_INTERVAL_S are rejected at the RPC layer.
watch_incoming: boolWhen true, routed PeerInfo arrivals (the inbound side of a
broadcast) are surfaced as peer_seen events and a discovered
row in the UI. When false, the X25519 key is still cached
(replies need it) but no event is emitted — useful on noisy
meshes where the local node does not want surfaced discovery.
min_peer_interval_s: u64Minimum seconds that must elapse between accepted broadcasts from any single peer. Subsequent broadcasts from the same peer arriving sooner are dropped before the keystore is touched — a single misbehaving peer cannot flood the keystore or the UI.
peer_cleanup: PeerCleanupConfigPeriodic cleanup of state.broadcast_peer_last_seen rate-
limit entries — see PeerCleanupConfig. Ephemeral defaults
(7 days / 1 h): the rate-limit map costs ~32 bytes per peer,
so the horizon is generous; the goal is bounding worst-case
growth on long-running nodes that see thousands of unique
broadcasters.
Implementations§
Source§impl BroadcastConfig
impl BroadcastConfig
Sourcepub const MIN_OUTGOING_INTERVAL_S: u64 = 30
pub const MIN_OUTGOING_INTERVAL_S: u64 = 30
Floor enforced by the RPC layer when a non-None
outgoing_interval_s is supplied. Below this we’d start
hammering the mesh.
Trait Implementations§
Source§impl Clone for BroadcastConfig
impl Clone for BroadcastConfig
Source§fn clone(&self) -> BroadcastConfig
fn clone(&self) -> BroadcastConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BroadcastConfig
impl Debug for BroadcastConfig
Source§impl Default for BroadcastConfig
impl Default for BroadcastConfig
Source§impl<'de> Deserialize<'de> for BroadcastConfig
impl<'de> Deserialize<'de> for BroadcastConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for BroadcastConfig
impl PartialEq for BroadcastConfig
Source§fn eq(&self, other: &BroadcastConfig) -> bool
fn eq(&self, other: &BroadcastConfig) -> bool
self and other values to be equal, and is used by ==.