From 33b926586a6c5b88a0bf6504d779f5220742ad43 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Wed, 16 Dec 2020 13:50:29 +0300 Subject: [PATCH] native: update contract names Follow https://github.com/neo-project/neo/pull/2152 . --- pkg/core/native/compatibility_test.go | 4 ++-- pkg/core/native/nativenames/names.go | 4 ++-- pkg/rpc/server/server_test.go | 2 +- pkg/rpc/server/testdata/testblocks.acc | Bin 7656 -> 7656 bytes 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/core/native/compatibility_test.go b/pkg/core/native/compatibility_test.go index 8011ca297..398dc4111 100644 --- a/pkg/core/native/compatibility_test.go +++ b/pkg/core/native/compatibility_test.go @@ -8,9 +8,9 @@ import ( // Compatibility test. hashes are taken directly from C# node. func TestNativeHashes(t *testing.T) { - require.Equal(t, "c0073f4c7069bf38995780c9da065f9b3949ea7a", newDesignate(false).Hash.StringLE()) + require.Equal(t, "136ec44854ad9a714901eb7d714714f1791203f2", newDesignate(false).Hash.StringLE()) require.Equal(t, "a6a6c15dcdc9b997dac448b6926522d22efeedfb", newGAS().Hash.StringLE()) - require.Equal(t, "cd97b70d82d69adfcd9165374109419fade8d6ab", newManagement().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()()) diff --git a/pkg/core/native/nativenames/names.go b/pkg/core/native/nativenames/names.go index 301f5e17d..96dd19f0f 100644 --- a/pkg/core/native/nativenames/names.go +++ b/pkg/core/native/nativenames/names.go @@ -2,11 +2,11 @@ package nativenames // Names of all native contracts. const ( - Management = "ManagementContract" + Management = "ContractManagement" Neo = "NeoToken" Gas = "GasToken" Policy = "PolicyContract" Oracle = "OracleContract" - Designation = "DesignationContract" + Designation = "RoleManagement" Notary = "Notary" ) diff --git a/pkg/rpc/server/server_test.go b/pkg/rpc/server/server_test.go index 22c47b757..9037cc7a3 100644 --- a/pkg/rpc/server/server_test.go +++ b/pkg/rpc/server/server_test.go @@ -57,7 +57,7 @@ type rpcTestCase struct { } const testContractHash = "743ed26f78e29ecd595535b74a943b1f9ccbc444" -const deploymentTxHash = "faa8d607f4000dbb3fc41dda51110369888b8b65c40de85d36ae9e4879dc4982" +const deploymentTxHash = "a4644e08389ced59e875a8d5bdcb8fdded7507ed7dc3915a37e5be71736ac7b4" const genesisBlockHash = "0542f4350c6e236d0509bcd98188b0034bfbecc1a0c7fcdb8e4295310d468b70" const verifyContractHash = "a2eb22340979804cb10cc1add0b8822c201f4d8a" diff --git a/pkg/rpc/server/testdata/testblocks.acc b/pkg/rpc/server/testdata/testblocks.acc index 31e4f10a1cd38fa19b99e59c75212fe56b73e8cd..4bed865540d2e8ae6fb9f8488db88e077423921f 100644 GIT binary patch delta 2030 zcmaKs`#+P51INuajK^iUn|KOC#)%ZV*yA!$3z1ufT$X!s*N(OJt(B$1c^sh>Lg~0I z(KM-bkh>!5IAnE_$U+H2IMwU?{QVO?pZELoncOqEC!36#iZzMOaR(XYHY!Vb;Eol) zzFS`sAbsNdU)#LrKJpW(JXOJqZYNQY4dfp{NX>bnS~Ppy*{Q1DE262!s#EHIjQP^@ zn06!pb-l!k_1d-^f0&=g+FOt%KcPALd>!PRxpvUXKKlgDsV7AuY%u0GOlbEsF~|M@ z8~smK49j&&N2rQzE+B4Fl1fNI+F*O?D+%QSGU1ED#i6L5hF+!G4r5BR~M^kOK>&M zW>Xs3RJWE*Ro>cu`&NA9SkxNxMlZsu*Q)4&*Rd#5jT762fiBy+BN{-ZO1%rb6fR%* z@p~;P2nh*En67|hu-*^f#WJ0MD|_{W({J7rzyo5jdSo1`B01PqjeW3IIgqS^ZQ-xF z-M+^8=c%T-4lm8l*wMV^vz*b0XWaS60JJ-k#;404D!c5u;f{NZWOHL>M_5;92-2!4 zkRV%@V6&)KZa^efv|d`B0b4yIJ?DpK^VB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