You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for configuring listening addresses with port 0, letting
the OS pick a free port. After binding, the actual port is resolved
via local_addr() and stored in ConnectionManager:
- active_listening_addresses: set on start(), cleared on stop()
- last_bound_addresses: set on start(), preserved across restarts
so the node rebinds the same ports (important for peer reconnection
with persisted addresses)
The listening_addresses() getter returns the bound addresses when
available, falling back to configured addresses. The gossip broadcast
task never announces port-0 or OS-assigned addresses, since those are
ephemeral and change on restart.
This eliminates the need for the deterministic port picker in tests,
which was fragile due to potential port collisions. Tests now use
127.0.0.1:0 and query the actual port after start().
AI tools were used in preparing this commit.
0 commit comments