From 90f1cc7a1a773adf635ad4185d13dd0d2ebeb76b Mon Sep 17 00:00:00 2001 From: Denis Kirillov Date: Mon, 25 Jul 2022 12:59:20 +0300 Subject: [PATCH] [#301] ns: Adopt neo-go int parameter Signed-off-by: Denis Kirillov --- ns/nns.go | 3 ++- ns/nns_test.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ns/nns.go b/ns/nns.go index 2a2ee09b..f867b738 100644 --- a/ns/nns.go +++ b/ns/nns.go @@ -4,6 +4,7 @@ import ( "context" "errors" "fmt" + "math/big" "net/url" "github.com/nspcc-dev/neo-go/pkg/core/state" @@ -122,7 +123,7 @@ func (n *NNS) ResolveContainerName(name string) (cid.ID, error) { }, { Type: smartcontract.IntegerType, - Value: int64(nns.TXT), + Value: big.NewInt(int64(nns.TXT)), }, }) if err != nil { diff --git a/ns/nns_test.go b/ns/nns_test.go index 14d8f09d..e777b7cf 100644 --- a/ns/nns_test.go +++ b/ns/nns_test.go @@ -36,7 +36,7 @@ func (x *testNeoClient) call(contract util.Uint160, method string, prm []smartco require.Len(x.t, prm, 2) require.Equal(x.t, smartcontract.StringType, prm[0].Type) require.Equal(x.t, smartcontract.IntegerType, prm[1].Type) - require.EqualValues(x.t, nns.TXT, prm[1].Value) + require.EqualValues(x.t, big.NewInt(int64(nns.TXT)), prm[1].Value) val, ok := prm[0].Value.(string) require.True(x.t, ok)