Skip to content

Commit ae08a4a

Browse files
authored
Merge pull request #104 from OceanProtocolEnterprise/feat/encrypt-false
Feat/encrypt false
2 parents cbaa7a2 + a90467c commit ae08a4a

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ocean-node",
3-
"version": "2.0.2",
3+
"version": "2.1.0",
44
"description": "Ocean Node is used to run all core services in the Ocean stack",
55
"author": "Ocean Protocol Foundation",
66
"license": "Apache-2.0",

src/components/Indexer/processors/MetadataEventProcessor.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,14 @@ export class MetadataEventProcessor extends BaseEventProcessor {
158158
)
159159
return
160160
}
161-
// for unencrypted DDOs
162-
if ((parseInt(flag) & 2) === 0 && !this.checkDdoHash(updatedDdo, metadataHash)) {
161+
// For remote DDOs, the on-chain hash covers the remote pointer payload,
162+
// not the fetched document body, so only inline unencrypted DDOs can be
163+
// revalidated here against metadataHash.
164+
if (
165+
!isRemoteDDO(decryptedDDO) &&
166+
(parseInt(flag) & 2) === 0 &&
167+
!this.checkDdoHash(updatedDdo, metadataHash)
168+
) {
163169
INDEXER_LOGGER.error('Unencrypted DDO hash does not match metadata hash.')
164170
await ddoState.update(
165171
this.networkId,

0 commit comments

Comments
 (0)