From 15d90925b81eb3203b24b97ea598e1a755e14110 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Wed, 17 Feb 2021 13:29:18 +0300 Subject: [PATCH] core: refactor (*NameService).checkName method It does not require native contract. --- pkg/core/native/name_service.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/core/native/name_service.go b/pkg/core/native/name_service.go index c3a557f33..5628865e9 100644 --- a/pkg/core/native/name_service.go +++ b/pkg/core/native/name_service.go @@ -429,7 +429,7 @@ func (n *NameService) setRecord(ic *interop.Context, args []stackitem.Item) stac name := toName(args[0]) rt := toRecordType(args[1]) data := toString(args[2]) - n.checkName(rt, data) + checkName(rt, data) domain := toDomain(name) token, _, err := n.tokenState(ic.DAO, []byte(domain)) @@ -447,7 +447,7 @@ func (n *NameService) setRecord(ic *interop.Context, args []stackitem.Item) stac return stackitem.Null{} } -func (n *NameService) checkName(rt RecordType, name string) { +func checkName(rt RecordType, name string) { var valid bool switch rt { case RecordTypeA: