aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorAva Chow <github@achow101.com>2024-04-25 16:08:15 -0400
committerAva Chow <github@achow101.com>2024-04-25 16:08:24 -0400
commit2eff198f4900c34442439ef2cbd9d82f4903f915 (patch)
treed85aa630752aab09a6dedcbc6a79a82f1343af9d /src/util
parent0e2e7d1a355ab6d4c483e192a2f881a5beef2381 (diff)
parentfd81a37239541d0d508402cd4eeb28f38128c1f2 (diff)
downloadbitcoin-2eff198f4900c34442439ef2cbd9d82f4903f915.tar.xz
Merge bitcoin/bitcoin#28834: net: attempts to connect to all resolved addresses when connecting to a node
fd81a37239541d0d508402cd4eeb28f38128c1f2 net: attempts to connect to all resolved addresses when connecting to a node (Sergi Delgado Segura) Pull request description: This is a follow-up of #28155 motivated by https://github.com/bitcoin/bitcoin/pull/28155#discussion_r1362677038 ## Rationale Prior to this, when establishing a network connection via `CConnman::ConnectNode`, if the connection needed address resolution, a single address would be picked at random from the resolved addresses and our node would try to connect to it. However, this would lead to the behavior of `ConnectNode` being unpredictable when the address was resolved to various ips (e.g. the address resolving to IPv4 and IPv6, but we only support one of them). This patches the aforementioned behavior by going over all resolved IPs until a valid one is found or until we exhaust them. ACKs for top commit: mzumsande: re-ACK fd81a37239541d0d508402cd4eeb28f38128c1f2 (just looked at diff, only small logging change) achow101: ACK fd81a37239541d0d508402cd4eeb28f38128c1f2 vasild: ACK fd81a37239541d0d508402cd4eeb28f38128c1f2 Tree-SHA512: fa1ebc5c84fe61dd0a7fe1113ae2d594a75ad661c43ed8984a31fc9bc50f166b2759b0d8d84ee5dc247691eff78c8156fac970af797bbcbf67492eec0353fb58
Diffstat (limited to 'src/util')
0 files changed, 0 insertions, 0 deletions