Skip to content

Commit

Permalink
better diviner logging
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelBCarter committed Oct 26, 2023
1 parent 4d9ec59 commit 7819f7c
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,15 @@ export class ImageThumbnailDiviner<TParams extends ImageThumbnailDivinerParams =
indexableHashes.map(async ([boundWitnessHash, imageThumbnailHash, timestampHash]) => {
const results = await archivist.get([imageThumbnailHash, timestampHash])
const imageThumbnailPayload = results.find(isImageThumbnail)
if (!imageThumbnailPayload) {
console.log(
`${moduleName}: Could not ImageThumbnail payload from BoundWitness ${boundWitnessHash} with Payload hash ${imageThumbnailHash}`,
)
return undefined
}
const timestampPayload = results.find(isTimestamp)
if (!imageThumbnailPayload || !timestampPayload) {
console.log('Could not find payload from hash to index')
if (!timestampPayload) {
console.log(`${moduleName}: Could not Timestamp payload from BoundWitness ${boundWitnessHash} with Payload hash ${timestampHash}`)
return undefined
}
const calculatedImageThumbnailHash = await PayloadHasher.hashAsync(imageThumbnailPayload)
Expand Down

0 comments on commit 7819f7c

Please sign in to comment.