2021-06-18 10:18:48 +00:00
|
|
|
package maddress
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
2022-12-23 17:35:35 +00:00
|
|
|
"github.com/TrueCloudLab/frostfs-node/pkg/network"
|
|
|
|
"github.com/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
|
|
|
|
}
|