[#505] ir/container: Change the way to approve container delete event
Call `Delete` method on the wrapper over the Container contract's client directly from `Processor.approveDeleteContainer`. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
e3b4c9eda0
commit
ff715c8037
1 changed files with 2 additions and 7 deletions
|
@ -9,10 +9,6 @@ import (
|
|||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
const (
|
||||
deleteContainerMethod = "delete"
|
||||
)
|
||||
|
||||
// Process new container from the user by checking container sanity
|
||||
// and sending approve tx back to morph.
|
||||
func (cp *Processor) processContainerPut(put *containerEvent.Put) {
|
||||
|
@ -87,9 +83,8 @@ func (cp *Processor) checkDeleteContainer(e *containerEvent.Delete) error {
|
|||
}
|
||||
|
||||
func (cp *Processor) approveDeleteContainer(e *containerEvent.Delete) {
|
||||
err := cp.morphClient.NotaryInvoke(cp.containerContract, cp.feeProvider.SideChainFee(), deleteContainerMethod,
|
||||
e.ContainerID(),
|
||||
e.Signature())
|
||||
// FIXME: here we should try notary invoke
|
||||
err := cp.cnrClient.Delete(e.ContainerID(), e.Signature())
|
||||
if err != nil {
|
||||
cp.log.Error("could not approve delete container",
|
||||
zap.String("error", err.Error()),
|
||||
|
|
Loading…
Reference in a new issue