Skip to content

Commit

Permalink
fix: check Graphsync retrievals too
Browse files Browse the repository at this point in the history
When the storage provider does not advertise HTTP retrieval, but
advertises Grapsync retrievals, then let's perform the retrieval check.

This was my original intention when I implemented IPNI querying.

Signed-off-by: Miroslav Bajtoš <[email protected]>
  • Loading branch information
bajtos committed Mar 7, 2024
1 parent fa07579 commit 4d7600e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/spark.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default class Spark {
const { indexerResult, provider } = await queryTheIndex(retrieval.cid)
stats.indexerResult = indexerResult

if (indexerResult !== 'OK') return
if (indexerResult !== 'OK' && indexerResult !== 'HTTP_NOT_ADVERTISED') return

stats.protocol = provider.protocol
stats.providerAddress = provider.address
Expand Down

0 comments on commit 4d7600e

Please sign in to comment.