From ec67ca5812c9cacb46d8b950e45318ebdaea4247 Mon Sep 17 00:00:00 2001 From: Joey Stanford Date: Wed, 29 Jul 2026 17:45:12 -0600 Subject: [PATCH] feat(propagation): add live PN policy setters Expose set_peering_cost, set_max_storage, and set_max_message_size so hosts can update a running PropagationNode without rebuilding config. --- crates/lxmf-core/src/propagation_node.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/crates/lxmf-core/src/propagation_node.rs b/crates/lxmf-core/src/propagation_node.rs index 0becfcc..8baa79a 100644 --- a/crates/lxmf-core/src/propagation_node.rs +++ b/crates/lxmf-core/src/propagation_node.rs @@ -366,6 +366,18 @@ impl PropagationNode { self.config.min_stamp_cost = cost; } + pub fn set_peering_cost(&mut self, cost: u8) { + self.config.peering_cost = cost; + } + + pub fn set_max_storage(&mut self, max: usize) { + self.config.max_storage = max; + } + + pub fn set_max_message_size(&mut self, max: usize) { + self.config.max_message_size = max; + } + pub fn offer_generation(&self) -> u64 { self.offer_generation }