diff --git a/nns/nns_contract.go b/nns/nns_contract.go index 2ad91157..ed2ea2a4 100644 --- a/nns/nns_contract.go +++ b/nns/nns_contract.go @@ -443,7 +443,8 @@ func DeleteRecords(name string, typ RecordType) { // Resolve resolves given name (not more then three redirects are allowed). func Resolve(name string, typ RecordType) []string { ctx := storage.GetReadOnlyContext() - return resolve(ctx, nil, name, typ, 2) + res := []string{} + return resolve(ctx, res, name, typ, 2) } // GetAllRecords returns an Iterator with RecordState items for the given name. diff --git a/tests/container_test.go b/tests/container_test.go index 9a265e17..d26221c5 100644 --- a/tests/container_test.go +++ b/tests/container_test.go @@ -153,7 +153,7 @@ func TestContainerPut(t *testing.T) { }) c.Invoke(t, stackitem.Null{}, "delete", cnt.id[:], cnt.sig, cnt.token) - cNNS.Invoke(t, stackitem.Null{}, "resolve", "mycnt.neofs", int64(nns.TXT)) + cNNS.Invoke(t, stackitem.NewArray([]stackitem.Item{}), "resolve", "mycnt.neofs", int64(nns.TXT)) t.Run("register in advance", func(t *testing.T) { cnt.value[len(cnt.value)-1] = 10 diff --git a/tests/nns_test.go b/tests/nns_test.go index 0e312437..91fc7ec5 100644 --- a/tests/nns_test.go +++ b/tests/nns_test.go @@ -380,4 +380,6 @@ func TestNNSResolve(t *testing.T) { c.Invoke(t, records, "resolve", "test.com", int64(nns.TXT)) c.Invoke(t, records, "resolve", "test.com.", int64(nns.TXT)) c.InvokeFail(t, "invalid domain name format", "resolve", "test.com..", int64(nns.TXT)) + // Empty result. + c.Invoke(t, stackitem.NewArray([]stackitem.Item{}), "resolve", "test.com", int64(nns.CNAME)) }