Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/components/core/compute/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export async function validateAlgoForDataset(
})

// Check if algorithm publisher is trusted
let isPublisherTrusted = true
let isPublisherTrusted = false
if (hasTrustedPublishers) {
if (!publishers.includes('*')) {
const algoDDO = await new FindDdoHandler(oceanNode).findAndFormatDdo(algoDID)
Expand All @@ -137,9 +137,12 @@ export async function validateAlgoForDataset(
isPublisherTrusted = publishers
.map((addr: string) => addr?.toLowerCase())
.includes(nftAddress?.toLowerCase())
} else {
isPublisherTrusted = true
}
}
return isAlgoTrusted && isPublisherTrusted
CORE_LOGGER.info(`Algorithm validation: ${isAlgoTrusted || isPublisherTrusted}`)
return isAlgoTrusted || isPublisherTrusted
}

return compute.allowRawAlgorithm
Expand Down
Loading