Page MenuHomePhabricator

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

Authored by Fabien on Apr 5 2024, 07:24.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.Apr 5 2024, 07:24
This revision is now accepted and ready to land.Apr 5 2024, 07:31
This revision was landed with ongoing or failed builds.Apr 5 2024, 07:32
This revision was automatically updated to reflect the committed changes.