native: call native contracts by ID instead of name

Fix #1666.
This commit is contained in:
Roman Khimov 2021-01-16 00:17:31 +03:00
parent f39ede9869
commit 6ecc6f0422
17 changed files with 48 additions and 55 deletions

View file

@ -2,19 +2,18 @@ package native
import (
"testing"
// "github.com/stretchr/testify/require"
"github.com/stretchr/testify/require"
)
// Compatibility test. hashes are taken directly from C# node.
func TestNativeHashes(t *testing.T) {
/*
require.Equal(t, "136ec44854ad9a714901eb7d714714f1791203f2", newDesignate(false).Hash.StringLE())
require.Equal(t, "a6a6c15dcdc9b997dac448b6926522d22efeedfb", newGAS().Hash.StringLE())
require.Equal(t, "081514120c7894779309255b7fb18b376cec731a", newManagement().Hash.StringLE())
require.Equal(t, "0a46e2e37c9987f570b4af253fb77e7eef0f72b6", newNEO().Hash.StringLE())
// Not yet a part of NEO.
//require.Equal(t, "", newNotary().Hash.StringLE()())
require.Equal(t, "b1c37d5847c2ae36bdde31d0cc833a7ad9667f8f", newOracle().Hash.StringLE())
require.Equal(t, "dde31084c0fdbebc7f5ed5f53a38905305ccee14", newPolicy().Hash.StringLE())
*/
require.Equal(t, "bee421fdbb3e791265d2104cb34934f53fcc0e45", newManagement().Hash.StringLE())
require.Equal(t, "4961bf0ab79370b23dc45cde29f568d0e0fa6e93", newNEO().Hash.StringLE())
require.Equal(t, "9ac04cf223f646de5f7faccafe34e30e5d4382a2", newGAS().Hash.StringLE())
require.Equal(t, "c939a4af1c762e5edca36d4b61c06ba82c4c6ff5", newPolicy().Hash.StringLE())
require.Equal(t, "f4bbd95569e8dda2cb84eb609a1488ddd0d9fa91", newDesignate(false).Hash.StringLE())
require.Equal(t, "8cd3889136056b3304ec59f6d424b8767710ed79", newOracle().Hash.StringLE())
// Not yet a part of NEO.
//require.Equal(t, "", newNotary().Hash.StringLE()())
}