[#607] *: Do not use deprecated elements of code

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-06-23 15:27:00 +03:00 committed by Leonard Lyubich
parent cbe20a2bac
commit 43eff09944
11 changed files with 42 additions and 34 deletions

View file

@ -2,7 +2,6 @@ package network
import (
"errors"
"fmt"
"github.com/nspcc-dev/neofs-api-go/pkg/netmap"
)
@ -47,16 +46,7 @@ var (
// 3. tls(optional, may be absent)
//
func VerifyMultiAddress(ni *netmap.NodeInfo) error {
// check if it can be parsed to network.Address
var netAddr Address
err := netAddr.FromString(ni.Address())
if err != nil {
return fmt.Errorf("could not parse multiaddr from NodeInfo: %w", err)
}
// check amount of protocols and its order
return checkProtocols(netAddr)
return iterateParsedAddresses(ni, checkProtocols)
}
func checkProtocols(a Address) error {