@@ -351,7 +351,7 @@ func (sr *immutableRef) computeChainMetadata(ctx context.Context, filter map[str
351351 }
352352 diffID := sr .getDiffID ()
353353 chainID = diffID
354- blobChainID = imagespecidentity .ChainID ([]digest.Digest {digest . Digest ( sr .getBlob () ), diffID })
354+ blobChainID = imagespecidentity .ChainID ([]digest.Digest {sr .getBlob (), diffID })
355355 case Layer :
356356 if _ , ok := filter [sr .ID ()]; ! ok {
357357 return nil
@@ -368,9 +368,9 @@ func (sr *immutableRef) computeChainMetadata(ctx context.Context, filter map[str
368368 return errors .Errorf ("failed to set blobchain for reference with non-addressable parent %q" , sr .layerParent .GetDescription ())
369369 }
370370 }
371- diffID := digest . Digest ( sr .getDiffID () )
371+ diffID := sr .getDiffID ()
372372 chainID = imagespecidentity .ChainID ([]digest.Digest {chainID , diffID })
373- blobID := imagespecidentity .ChainID ([]digest.Digest {digest . Digest ( sr .getBlob () ), diffID })
373+ blobID := imagespecidentity .ChainID ([]digest.Digest {sr .getBlob (), diffID })
374374 blobChainID = imagespecidentity .ChainID ([]digest.Digest {blobChainID , blobID })
375375 case Merge :
376376 baseInput := sr .mergeParents [0 ]
@@ -386,9 +386,9 @@ func (sr *immutableRef) computeChainMetadata(ctx context.Context, filter map[str
386386 // not enough information to compute chain at this time
387387 return nil
388388 }
389- diffID := digest . Digest ( layer .getDiffID () )
389+ diffID := layer .getDiffID ()
390390 chainID = imagespecidentity .ChainID ([]digest.Digest {chainID , diffID })
391- blobID := imagespecidentity .ChainID ([]digest.Digest {digest . Digest ( layer .getBlob () ), diffID })
391+ blobID := imagespecidentity .ChainID ([]digest.Digest {layer .getBlob (), diffID })
392392 blobChainID = imagespecidentity .ChainID ([]digest.Digest {blobChainID , blobID })
393393 }
394394 }
@@ -397,7 +397,7 @@ func (sr *immutableRef) computeChainMetadata(ctx context.Context, filter map[str
397397 // this diff is its own blob
398398 diffID := sr .getDiffID ()
399399 chainID = diffID
400- blobChainID = imagespecidentity .ChainID ([]digest.Digest {digest . Digest ( sr .getBlob () ), diffID })
400+ blobChainID = imagespecidentity .ChainID ([]digest.Digest {sr .getBlob (), diffID })
401401 } else {
402402 // re-using upper blob
403403 chainID = sr .diffParents .upper .getChainID ()
0 commit comments