[#362] ir/netmap: Use const keys to node attributes from the API lib

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-02-10 23:54:27 +03:00 committed by Leonard Lyubich
parent 34248b00ed
commit a737a46988
2 changed files with 11 additions and 22 deletions

View file

@ -30,7 +30,7 @@ var errMissingRequiredAttr = errors.New("missing required attribute in DB record
func (v *Validator) VerifyAndUpdate(n *netmap.NodeInfo) error {
mAttr := uniqueAttributes(n.Attributes())
attrLocode, ok := mAttr[attrKeyLocode]
attrLocode, ok := mAttr[netmap.AttrUNLOCODE]
if !ok {
return errMissingLocode
}