Page MenuHomePhabricator

net: avoid unnecessary GetBindAddress() call
ClosedPublic

Authored by PiRK on Feb 8 2022, 14:40.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC1e55ff33b8be: net: avoid unnecessary GetBindAddress() call
Summary

Our local (bind) address is already saved in CNode::addrBind and there
is no need to re-retrieve it again with GetBindAddress().

Also, for I2P connections CNode::addrBind would contain our I2P
address, but GetBindAddress() would return something like
127.0.0.1:RANDOM_PORT.

This is a backport of core#20685 [7/20]
https://github.com/bitcoin/bitcoin/pull/20685/commits/f6c267db3be2d7077fd2bdbd34860eba838dea99

Depends on D11015

Test Plan

ninja all check-all

Diff Detail

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