2021-06-18 10:18:48 +00:00
|
|
|
package maddress
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
2023-03-07 13:38:26 +00:00
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/network"
|
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/netmap"
|
2021-06-18 10:18:48 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// VerifyAndUpdate calls network.VerifyAddress.
|
|
|
|
func (v *Validator) VerifyAndUpdate(n *netmap.NodeInfo) error {
|
2022-06-08 23:18:26 +00:00
|
|
|
err := network.VerifyMultiAddress(*n)
|
2021-06-18 10:18:48 +00:00
|
|
|
if err != nil {
|
|
|
|
return fmt.Errorf("could not verify multiaddress: %w", err)
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|