[#607] network: Do not return error from Address.HostAddrString method

Panic if internal `manet.DialArgs` call returns error since this is
unexpected according to `AddressFromString` implementation.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-06-16 14:08:07 +03:00 committed by Leonard Lyubich
parent 4c2d8d5ac9
commit 35f81729e4
6 changed files with 15 additions and 36 deletions

View file

@ -257,13 +257,8 @@ func getSDKClient(key *ecdsa.PrivateKey) (client.Client, error) {
return nil, err
}
hostAddr, err := netAddr.HostAddrString()
if err != nil {
return nil, errInvalidEndpoint
}
options := []client.Option{
client.WithAddress(hostAddr),
client.WithAddress(netAddr.HostAddrString()),
client.WithDefaultPrivateKey(key),
}