Currently, the p2p server has a TODO comment in server.go:
TODO: track in-progress inbound node IDs (pre-Peer) to avoid dialing them.
This issue addresses a race condition where:
- Node A initiates an inbound connection to us (starts handshaking)
- Simultaneously, our dial scheduler attempts to dial Node A outbound
- Both connections can proceed, resulting in duplicate connections to the same peer
This wastes resources and can cause issues with peer counting and connection management.