@@ -81,6 +81,7 @@ import { DDOManager } from '@oceanprotocol/ddo-js'
8181import Dockerode from 'dockerode'
8282import { C2DEngineDocker } from '../../components/c2d/compute_engine_docker.js'
8383import { createHashForSignature , safeSign } from '../utils/signature.js'
84+ import { create256Hash } from '../../utils/crypt.js'
8485
8586const sleep = ( ms : number ) => new Promise ( ( resolve ) => setTimeout ( resolve , ms ) )
8687
@@ -2733,6 +2734,7 @@ describe('Compute Access Restrictions', () => {
27332734 const testJob : DBComputeJob = {
27342735 owner : await consumerAccount . getAddress ( ) ,
27352736 jobId : testJobId ,
2737+ jobIdHash : create256Hash ( testJobId ) ,
27362738 dateCreated : now ,
27372739 status : C2DStatusNumber . PublishingResults ,
27382740 statusText : C2DStatusText . PublishingResults ,
@@ -2749,6 +2751,7 @@ describe('Compute Access Restrictions', () => {
27492751 token : paymentToken ,
27502752 lockTx : '0x123' ,
27512753 claimTx : '' ,
2754+ cancelTx : '' ,
27522755 cost : 0
27532756 } ,
27542757 resources : [
@@ -2901,6 +2904,7 @@ describe('Compute Access Restrictions', () => {
29012904 const testJob : DBComputeJob = {
29022905 owner : await consumerAccount . getAddress ( ) ,
29032906 jobId : testJobId ,
2907+ jobIdHash : create256Hash ( testJobId ) ,
29042908 dateCreated : now . toString ( ) ,
29052909 status : C2DStatusNumber . JobSettle ,
29062910 statusText : C2DStatusText . JobSettle ,
@@ -2917,6 +2921,7 @@ describe('Compute Access Restrictions', () => {
29172921 token : paymentToken ,
29182922 lockTx : lockTx || '0x123' ,
29192923 claimTx : '' ,
2924+ cancelTx : '' ,
29202925 cost : 0
29212926 } ,
29222927 resources : [
@@ -2968,6 +2973,7 @@ describe('Compute Access Restrictions', () => {
29682973 const testJob : DBComputeJob = {
29692974 owner : await consumerAccount . getAddress ( ) ,
29702975 jobId : testJobId ,
2976+ jobIdHash : create256Hash ( testJobId ) ,
29712977 dateCreated : now . toString ( ) ,
29722978 status : C2DStatusNumber . JobSettle ,
29732979 statusText : C2DStatusText . JobSettle ,
@@ -2984,6 +2990,7 @@ describe('Compute Access Restrictions', () => {
29842990 token : paymentToken ,
29852991 lockTx : '0xexpired' ,
29862992 claimTx : '' ,
2993+ cancelTx : '' ,
29872994 cost : 0
29882995 } ,
29892996 resources : [
@@ -3032,6 +3039,7 @@ describe('Compute Access Restrictions', () => {
30323039 const testJob : DBComputeJob = {
30333040 owner : await consumerAccount . getAddress ( ) ,
30343041 jobId : testJobId ,
3042+ jobIdHash : create256Hash ( testJobId ) ,
30353043 dateCreated : now ,
30363044 status : C2DStatusNumber . JobSettle ,
30373045 statusText : C2DStatusText . JobSettle ,
@@ -3095,6 +3103,7 @@ describe('Compute Access Restrictions', () => {
30953103 const testJob : DBComputeJob = {
30963104 owner : await consumerAccount . getAddress ( ) ,
30973105 jobId : testJobId ,
3106+ jobIdHash : create256Hash ( testJobId ) ,
30983107 dateCreated : now . toString ( ) ,
30993108 status : C2DStatusNumber . JobSettle ,
31003109 statusText : C2DStatusText . JobSettle ,
0 commit comments