<!-- This issue tracker is only for technical issues related to Bitcoin Core. General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com. For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/. If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue! -->
<!-- Describe the issue -->
This behavior is okay for ipv4 based on https://bitcoin.stackexchange.com/questions/87739/can-a-bitcoin-node-create-an-outgoing-connection-to-a-inbound-node
However, making multiple connections to same i2p peer makes no sense IMO
Expected behavior
No connections (outbound/inbound) should be initiated with i2p address that already exists as one of the peer.
Actual behavior


To reproduce
- Setup 3 nodes such that node2 and node3 works with i2p
- Connect node2 manually with
addnodein config to node1 - Connect node3 manually with node2 using i2p address
- Observe result for
getpeerinfoin a few minutes or check peers list in bitcoin-qt
System information
Bitcoin Core Master Branch, v24.0rc2 and v24.0rc4