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

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

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

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-05-25 18:55:31 +03:00 committed by Leonard Lyubich
parent 0f91b78df1
commit 461fcfcf19

View file

@ -66,7 +66,7 @@ func (cp *Processor) checkPutContainer(e *containerEvent.Put) error {
func (cp *Processor) approvePutContainer(e *containerEvent.Put) {
// FIXME: here we should bind key to owner if needed
err := cp.cnrClient.Put(e.Container(), e.PublicKey(), e.Signature(), nil)
err := cp.cnrClient.Put(e.Container(), e.PublicKey(), e.Signature(), e.SessionToken())
if err != nil {
cp.log.Error("could not approve put container",
zap.String("error", err.Error()),