forked from TrueCloudLab/frostfs-contract
[#174] subnet: Sync notifications and method names
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
76933df0a9
commit
c2b7e638fa
2 changed files with 7 additions and 7 deletions
|
@ -3,7 +3,7 @@ safemethods: ["version"]
|
||||||
permissions:
|
permissions:
|
||||||
- methods: ["update"]
|
- methods: ["update"]
|
||||||
events:
|
events:
|
||||||
- name: SubnetPut
|
- name: Put
|
||||||
parameters:
|
parameters:
|
||||||
- name: id
|
- name: id
|
||||||
type: ByteArray
|
type: ByteArray
|
||||||
|
@ -11,11 +11,11 @@ events:
|
||||||
type: PublicKey
|
type: PublicKey
|
||||||
- name: info
|
- name: info
|
||||||
type: ByteArray
|
type: ByteArray
|
||||||
- name: SubnetDelete
|
- name: Delete
|
||||||
parameters:
|
parameters:
|
||||||
- name: id
|
- name: id
|
||||||
type: ByteArray
|
type: ByteArray
|
||||||
- name: NodeRemove
|
- name: RemoveNode
|
||||||
parameters:
|
parameters:
|
||||||
- name: subnetID
|
- name: subnetID
|
||||||
type: ByteArray
|
type: ByteArray
|
||||||
|
|
|
@ -106,7 +106,7 @@ func Put(id []byte, ownerKey interop.PublicKey, info []byte) {
|
||||||
if !runtime.CheckWitness(ownerKey) {
|
if !runtime.CheckWitness(ownerKey) {
|
||||||
panic("put: witness check failed")
|
panic("put: witness check failed")
|
||||||
}
|
}
|
||||||
runtime.Notify("SubnetPut", id, ownerKey, info)
|
runtime.Notify("Put", id, ownerKey, info)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -174,7 +174,7 @@ func Delete(id []byte) {
|
||||||
key[0] = infoPrefix
|
key[0] = infoPrefix
|
||||||
storage.Delete(ctx, key)
|
storage.Delete(ctx, key)
|
||||||
|
|
||||||
runtime.Notify("SubnetDelete", id)
|
runtime.Notify("Delete", id)
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddNodeAdmin adds new node administrator to the specified subnetwork.
|
// 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...))
|
storage.Delete(ctx, append(stKey, node...))
|
||||||
|
|
||||||
runtime.Notify("NodeRemove", subnetID, node)
|
runtime.Notify("RemoveNode", subnetID, node)
|
||||||
}
|
}
|
||||||
|
|
||||||
// NodeAllowed checks if node is included in the
|
// NodeAllowed checks if node is included in the
|
||||||
|
|
Loading…
Reference in a new issue