From c2b7e638fa61438284177f30ef110dc51e264279 Mon Sep 17 00:00:00 2001 From: Pavel Karpy Date: Wed, 24 Nov 2021 20:26:33 +0300 Subject: [PATCH] [#174] subnet: Sync notifications and method names Signed-off-by: Pavel Karpy --- subnet/config.yml | 6 +++--- subnet/subnet_contract.go | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/subnet/config.yml b/subnet/config.yml index f4c0d6c..a73f086 100644 --- a/subnet/config.yml +++ b/subnet/config.yml @@ -3,7 +3,7 @@ safemethods: ["version"] permissions: - methods: ["update"] events: - - name: SubnetPut + - name: Put parameters: - name: id type: ByteArray @@ -11,11 +11,11 @@ events: type: PublicKey - name: info type: ByteArray - - name: SubnetDelete + - name: Delete parameters: - name: id type: ByteArray - - name: NodeRemove + - name: RemoveNode parameters: - name: subnetID type: ByteArray diff --git a/subnet/subnet_contract.go b/subnet/subnet_contract.go index a41f7ff..824ff16 100644 --- a/subnet/subnet_contract.go +++ b/subnet/subnet_contract.go @@ -52,7 +52,7 @@ const ( ) const ( - userIDSize = 27 + userIDSize = 27 subnetIDSize = 5 groupIDSize = 5 ) @@ -106,7 +106,7 @@ func Put(id []byte, ownerKey interop.PublicKey, info []byte) { if !runtime.CheckWitness(ownerKey) { panic("put: witness check failed") } - runtime.Notify("SubnetPut", id, ownerKey, info) + runtime.Notify("Put", id, ownerKey, info) return } @@ -174,7 +174,7 @@ func Delete(id []byte) { key[0] = infoPrefix storage.Delete(ctx, key) - runtime.Notify("SubnetDelete", id) + runtime.Notify("Delete", id) } // AddNodeAdmin adds new node administrator to the specified subnetwork. @@ -323,7 +323,7 @@ func RemoveNode(subnetID []byte, node interop.PublicKey) { storage.Delete(ctx, append(stKey, node...)) - runtime.Notify("NodeRemove", subnetID, node) + runtime.Notify("RemoveNode", subnetID, node) } // NodeAllowed checks if node is included in the