forked from TrueCloudLab/frostfs-node
[#505] ir/container: Change the way to approve container put event
Call `Put` method on the wrapper over the Container contract's client directly from `Processor.approvePutContainer`. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
3a5849fadb
commit
24ad60e1c8
1 changed files with 3 additions and 5 deletions
|
@ -11,7 +11,6 @@ import (
|
|||
|
||||
const (
|
||||
deleteContainerMethod = "delete"
|
||||
putContainerMethod = "put"
|
||||
)
|
||||
|
||||
// Process new container from the user by checking container sanity
|
||||
|
@ -53,10 +52,9 @@ func (cp *Processor) checkPutContainer(e *containerEvent.Put) error {
|
|||
}
|
||||
|
||||
func (cp *Processor) approvePutContainer(e *containerEvent.Put) {
|
||||
err := cp.morphClient.NotaryInvoke(cp.containerContract, cp.feeProvider.SideChainFee(), putContainerMethod,
|
||||
e.Container(),
|
||||
e.Signature(),
|
||||
e.PublicKey())
|
||||
// FIXME: here we should try notary invoke
|
||||
// FIXME: here we should bind key to owner if needed
|
||||
err := cp.cnrClient.Put(e.Container(), e.PublicKey(), e.Signature())
|
||||
if err != nil {
|
||||
cp.log.Error("could not approve put container",
|
||||
zap.String("error", err.Error()),
|
||||
|
|
Loading…
Reference in a new issue