Skip to content

Commit b0f1cee

Browse files
committed
fix: ensure unique hashes for object mapping by filtering out duplicate CID
1 parent 5868624 commit b0f1cee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

services/file-retriever/src/services/dsnFetcher.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,9 @@ const fetchNode = async (cid: string, siblings: string[]): Promise<PBNode> => {
284284
}
285285

286286
const nodeObjectMappingHash = getObjectMappingHash(cid)
287-
const hashes = siblings.map(getObjectMappingHash)
287+
const hashes = [cid, ...siblings.filter((e) => e !== cid)].map(
288+
getObjectMappingHash,
289+
)
288290
const objectMappings = await objectMappingIndexer.get_object_mappings({
289291
hashes,
290292
})

0 commit comments

Comments
 (0)