HomePhabricator

[net] Don't create outbound connection to the same ip as an inbound

Description

[net] Don't create outbound connection to the same ip as an inbound

Summary:
This fixes a bug that has been introduced in D15850. The AlreadyConnectedToAddress() function needs to filter on IP only to prevent the node from initiating an outbound connection to a peer that is already connected as an inbound.

This is a partial revert of rABC02b4774d7c2400b7e5a6f63f2e1ed2d01192c33e.

Depends on D15898.

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Differential Revision: https://reviews.bitcoinabc.org/D15899

Details

Provenance
FabienAuthored on Apr 5 2024, 07:24
FabienPushed on Apr 5 2024, 07:32
Reviewer
Restricted Project
Differential Revision
D15899: [net] Don't create outbound connection to the same ip as an inbound
Parents
rABC3fbe50625df5: Bump version to 0.29.1
Branches
Unknown
Tags
Unknown