Skip to content

[network] reopen #119: connection_events() still a never-yielding placeholder #561

@intendednull

Description

@intendednull

Followup to #119 (closed 2026-04-19 as completed). Recheck shows the Network::connection_events() impls in crates/network/src/iroh.rs and crates/network/src/mem.rs still return futures_lite::stream::pending() — i.e. the original placeholder is unchanged. The TODO at crates/network/src/traits.rs:161 cites #119, which is now closed, so the link is dead.

Scope

Same as the original #119:

  • Option A: wire iroh's underlying connection-state events into a real ConnectionEvent stream (RelayUp / RelayDown / PeerConnected / PeerDisconnected). For MemNetwork, emit synthetic events when MemHub subscribes/unsubscribes a peer.
  • Option B: if no in-tree caller actually consumes the stream, drop the trait method entirely.

Start with a workspace-wide grep for connection_events callers to pick A vs B.

Why this matters

The TODO has been outstanding since the original #119 (filed 2026-04-10). Closing the issue without resolving the placeholder broke the link from code to tracker, making the debt invisible to future audits.

Refs

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions