[#1000] ir/nodeValidators: Ignore zero subnet validation

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2021-12-01 12:01:50 +03:00 committed by LeL
parent 98f288c946
commit 5b8f195563

View file

@ -14,6 +14,12 @@ func (v *Validator) VerifyAndUpdate(n *netmap.NodeInfo) error {
prm := morphsubnet.NodeAllowedPrm{}
err := n.IterateSubnets(func(id subnetid.ID) error {
// every node can be bootstrapped
// to the zero subnetwork
if subnetid.IsZero(id) {
return nil
}
rawSubnetID, err := id.Marshal()
if err != nil {
return fmt.Errorf("could not marshal subnetwork ID: %w", err)