diff options
| author | tv <tv@krebsco.de> | 2026-10-26 20:38:07 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-26 20:38:07 +0100 |
| commit | 5247296250355b7f75a993856d3675f73114d253 (patch) | |
| tree | 5cd40c49e9a05b88d1ef3bce715a93e81d4d126e /src/state/mod.rs | |
| parent | 354a4ccbd097dcf35e74b1cf193fd84756b1e149 (diff) | |
remove some dead comments
Diffstat (limited to 'src/state/mod.rs')
| -rw-r--r-- | src/state/mod.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/state/mod.rs b/src/state/mod.rs index beac886..787fd8c 100644 --- a/src/state/mod.rs +++ b/src/state/mod.rs @@ -57,8 +57,6 @@ pub(crate) struct AppState { pub(crate) lifecycle: Arc<RwLock<NodeLifecycle>>, - // Serializes swarm-ID establishment, peer membership, and readiness transitions. - //[concurrent]swarm_validation: Arc<Mutex<()>>, pub(crate) peer_states: Arc<RwLock<HashMap<String, Arc<Mutex<PeerState>>>>>, pub(crate) transport: Arc<dyn transport::Transport>, pub(crate) firewall: Arc<Firewall>, @@ -69,7 +67,8 @@ pub(crate) struct AppState { pub(crate) sync_events: mpsc::UnboundedSender<SyncEvent>, - // TODO see key_watchers.md ("Use a per-key notification registry instead of the global `watch<u64>`") + /// The document's version: bumped after every change (`notify_store_changed`). The + /// change publisher (`swarm::sync`) waits on it; a measurement compares it. pub(crate) change_tx: watch::Sender<u64>, pub(crate) initial_sync_done: Arc<AtomicBool>, @@ -212,7 +211,6 @@ impl AppState { // Record the expected swarm without making the node Ready. Bootstrap owns readiness. pub(crate) async fn set_expected_swarm_id(&self, swarm_id: String) -> Result<()> { - //[concurrent]let _guard = self.swarm_validation.lock().await; let mut lifecycle = self.lifecycle.write().await; match &*lifecycle { NodeLifecycle::Joining { @@ -256,7 +254,6 @@ impl AppState { // Only bootstrap should call this, after validating document metadata. pub(crate) async fn mark_ready(&self, swarm_id: String) -> Result<()> { - //[concurrent]let _guard = self.swarm_validation.lock().await; let mut lifecycle = self.lifecycle.write().await; match &*lifecycle { NodeLifecycle::Joining { |
