diff --git a/cmd/neofs-cli/modules/object/lock.go b/cmd/neofs-cli/modules/object/lock.go index 1e1482756..fcb37cbe0 100644 --- a/cmd/neofs-cli/modules/object/lock.go +++ b/cmd/neofs-cli/modules/object/lock.go @@ -63,9 +63,11 @@ var objectLockCmd = &cobra.Command{ currEpoch, err := internalclient.GetCurrentEpoch(ctx, endpoint) common.ExitOnErr(cmd, "Request current epoch: %w", err) - exp += currEpoch + exp = currEpoch + lifetime } + common.PrintVerbose("Lock object will expire at %d epoch", exp) + var expirationAttr objectSDK.Attribute expirationAttr.SetKey(objectV2.SysAttributeExpEpoch) expirationAttr.SetValue(strconv.FormatUint(exp, 10))