Merge pull request #1721 from nspcc-dev/fix/nsrace

core/tests: fix NameService test
This commit is contained in:
Roman Khimov 2021-02-10 10:17:38 +03:00 committed by GitHub
commit c966f97ed2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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(""))