From 468dc5aad6ac1f5b8a586d1d674485fbf6331705 Mon Sep 17 00:00:00 2001 From: Evgeniy Stratonikov Date: Mon, 8 Feb 2021 17:56:08 +0300 Subject: [PATCH] core/tests: fix NameService test We should look for the timestamp of the block with `register`. --- pkg/core/native_name_service_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/core/native_name_service_test.go b/pkg/core/native_name_service_test.go index 1ffd822e4..56b868e8b 100644 --- a/pkg/core/native_name_service_test.go +++ b/pkg/core/native_name_service_test.go @@ -151,13 +151,12 @@ func TestRegisterAndRenew(t *testing.T) { testNameServiceInvoke(t, bc, "balanceOf", 0, testchain.CommitteeScriptHash()) testNameServiceInvokeAux(t, bc, defaultRegisterSysfee, true, "register", true, "neo.com", testchain.CommitteeScriptHash()) + topBlock := bc.topBlock.Load().(*block.Block) + expectedExpiration := topBlock.Timestamp/1000 + secondsInYear testNameServiceInvokeAux(t, bc, defaultRegisterSysfee, true, "register", false, "neo.com", testchain.CommitteeScriptHash()) testNameServiceInvoke(t, bc, "isAvailable", false, "neo.com") - topBlock := bc.topBlock.Load().(*block.Block) - expectedExpiration := topBlock.Timestamp/1000 + secondsInYear - props := stackitem.NewMap() props.Add(stackitem.Make("name"), stackitem.Make("neo.com")) props.Add(stackitem.Make("description"), stackitem.Make(""))