[#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 (
|
const (
|
||||||
deleteContainerMethod = "delete"
|
deleteContainerMethod = "delete"
|
||||||
putContainerMethod = "put"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Process new container from the user by checking container sanity
|
// 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) {
|
func (cp *Processor) approvePutContainer(e *containerEvent.Put) {
|
||||||
err := cp.morphClient.NotaryInvoke(cp.containerContract, cp.feeProvider.SideChainFee(), putContainerMethod,
|
// FIXME: here we should try notary invoke
|
||||||
e.Container(),
|
// FIXME: here we should bind key to owner if needed
|
||||||
e.Signature(),
|
err := cp.cnrClient.Put(e.Container(), e.PublicKey(), e.Signature())
|
||||||
e.PublicKey())
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
cp.log.Error("could not approve put container",
|
cp.log.Error("could not approve put container",
|
||||||
zap.String("error", err.Error()),
|
zap.String("error", err.Error()),
|
||||||
|
|
Loading…
Reference in a new issue