From 7865bc592533b59b6a10ee38901057dd8cca4f7a Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Tue, 4 Aug 2020 15:05:31 +0300 Subject: [PATCH] core: fix native policy tests That was a merge problem. --- pkg/core/native_policy_test.go | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/pkg/core/native_policy_test.go b/pkg/core/native_policy_test.go index e38b789d3..f01c2d891 100644 --- a/pkg/core/native_policy_test.go +++ b/pkg/core/native_policy_test.go @@ -109,36 +109,24 @@ func TestBlockSystemFee(t *testing.T) { t.Run("get", func(t *testing.T) { res, err := invokeNativePolicyMethod(chain, "getMaxBlockSystemFee") require.NoError(t, err) - checkResult(t, res, smartcontract.Parameter{ - Type: smartcontract.IntegerType, - Value: 9000 * native.GASFactor, - }) + checkResult(t, res, stackitem.NewBigInteger(big.NewInt(9000*native.GASFactor))) require.NoError(t, chain.persist()) }) t.Run("set, too low fee", func(t *testing.T) { res, err := invokeNativePolicyMethod(chain, "setMaxBlockSystemFee", bigint.ToBytes(big.NewInt(4007600))) require.NoError(t, err) - checkResult(t, res, smartcontract.Parameter{ - Type: smartcontract.BoolType, - Value: false, - }) + checkResult(t, res, stackitem.NewBool(false)) }) t.Run("set, success", func(t *testing.T) { res, err := invokeNativePolicyMethod(chain, "setMaxBlockSystemFee", bigint.ToBytes(big.NewInt(100000000))) require.NoError(t, err) - checkResult(t, res, smartcontract.Parameter{ - Type: smartcontract.BoolType, - Value: true, - }) + checkResult(t, res, stackitem.NewBool(true)) require.NoError(t, chain.persist()) res, err = invokeNativePolicyMethod(chain, "getMaxBlockSystemFee") require.NoError(t, err) - checkResult(t, res, smartcontract.Parameter{ - Type: smartcontract.IntegerType, - Value: 100000000, - }) + checkResult(t, res, stackitem.NewBigInteger(big.NewInt(100000000))) require.NoError(t, chain.persist()) }) }