[#525] ir/container: Write session token on delete approval

Approved removed container ID should be stored in sidechain along with
related session token.

Forward session token from `Delete` event to `Wrapper.Delete` method.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-05-26 14:03:51 +03:00 committed by Leonard Lyubich
parent 631d7b0e07
commit 40c796bd7e

View file

@ -124,7 +124,7 @@ func (cp *Processor) checkDeleteContainer(e *containerEvent.Delete) error {
func (cp *Processor) approveDeleteContainer(e *containerEvent.Delete) {
// FIXME: here we should try notary invoke
err := cp.cnrClient.Delete(e.ContainerID(), e.Signature(), nil)
err := cp.cnrClient.Delete(e.ContainerID(), e.Signature(), e.SessionToken())
if err != nil {
cp.log.Error("could not approve delete container",
zap.String("error", err.Error()),