[#522] Use HostAddrString as RPC endpoint instead of IPAddrString

To enable TLS support we can't operate with IP addresses directly.
Certificates are issued with host names so it is required to
pass them into RPC client. DNS resolving should be done by transport
layer and not be a part of node. Therefore `IPAddrString` usage is
removed from code.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2021-05-17 15:04:32 +03:00 committed by Alex Vanin
parent 2456873473
commit 16f13bc0a5
13 changed files with 23 additions and 23 deletions

View file

@ -117,7 +117,7 @@ func (ap *Processor) findStorageGroups(cid *container.ID, shuffled netmap.Nodes)
zap.Int("total_tries", ln),
)
addr, err := network.IPAddrFromMultiaddr(shuffled[i].Address())
addr, err := network.HostAddrFromMultiaddr(shuffled[i].Address())
if err != nil {
log.Warn("can't parse remote address", zap.String("error", err.Error()))