forked from TrueCloudLab/frostfs-contract
[#7] Refactor common.CheckAlphabetWitness()
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
d8530284fd
commit
b9be2ac036
8 changed files with 27 additions and 43 deletions
|
@ -234,8 +234,7 @@ func PutNamed(container []byte, signature interop.Signature,
|
|||
panic("insufficient balance to create container")
|
||||
}
|
||||
|
||||
multiaddr := common.AlphabetAddress()
|
||||
common.CheckAlphabetWitness(multiaddr)
|
||||
common.CheckAlphabetWitness()
|
||||
// todo: check if new container with unique container id
|
||||
|
||||
details := common.ContainerFeeTransferDetails(containerID)
|
||||
|
@ -320,8 +319,7 @@ func Delete(containerID []byte, signature interop.Signature, token []byte) {
|
|||
return
|
||||
}
|
||||
|
||||
multiaddr := common.AlphabetAddress()
|
||||
common.CheckAlphabetWitness(multiaddr)
|
||||
common.CheckAlphabetWitness()
|
||||
|
||||
key := append([]byte(nnsHasAliasKey), containerID...)
|
||||
domain := storage.Get(ctx, key).(string)
|
||||
|
@ -433,8 +431,7 @@ func SetEACL(eACL []byte, signature interop.Signature, publicKey interop.PublicK
|
|||
panic(NotFoundError)
|
||||
}
|
||||
|
||||
multiaddr := common.AlphabetAddress()
|
||||
common.CheckAlphabetWitness(multiaddr)
|
||||
common.CheckAlphabetWitness()
|
||||
|
||||
rule := ExtendedACL{
|
||||
value: eACL,
|
||||
|
@ -567,8 +564,7 @@ func IterateContainerSizes(epoch int) iterator.Iterator {
|
|||
func NewEpoch(epochNum int) {
|
||||
ctx := storage.GetContext()
|
||||
|
||||
multiaddr := common.AlphabetAddress()
|
||||
common.CheckAlphabetWitness(multiaddr)
|
||||
common.CheckAlphabetWitness()
|
||||
|
||||
cleanupContainers(ctx, epochNum)
|
||||
}
|
||||
|
@ -576,8 +572,7 @@ func NewEpoch(epochNum int) {
|
|||
// StartContainerEstimation method produces StartEstimation notification.
|
||||
// It can be invoked only by Alphabet nodes of the Inner Ring.
|
||||
func StartContainerEstimation(epoch int) {
|
||||
multiaddr := common.AlphabetAddress()
|
||||
common.CheckAlphabetWitness(multiaddr)
|
||||
common.CheckAlphabetWitness()
|
||||
|
||||
runtime.Notify("StartEstimation", epoch)
|
||||
runtime.Log("notification has been produced")
|
||||
|
@ -586,8 +581,7 @@ func StartContainerEstimation(epoch int) {
|
|||
// StopContainerEstimation method produces StopEstimation notification.
|
||||
// It can be invoked only by Alphabet nodes of the Inner Ring.
|
||||
func StopContainerEstimation(epoch int) {
|
||||
multiaddr := common.AlphabetAddress()
|
||||
common.CheckAlphabetWitness(multiaddr)
|
||||
common.CheckAlphabetWitness()
|
||||
|
||||
runtime.Notify("StopEstimation", epoch)
|
||||
runtime.Log("notification has been produced")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue