Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: manual check for a given task #71

Merged
merged 1 commit into from
May 27, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion lib/ipni-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ export async function queryTheIndex (cid, providerId) {
}
}

console.log('All advertisements are for unsupported protocols.')
console.log('All advertisements are from other miners or for unsupported protocols.')
return { indexerResult: 'NO_VALID_ADVERTISEMENT' }
}
15 changes: 15 additions & 0 deletions manual-check.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// Usage:
// zinnia run manual-check.js
//

import Spark from './lib/spark.js'

// The task to check, replace with your own values
const cid = 'bafkreih25dih6ug3xtj73vswccw423b56ilrwmnos4cbwhrceudopdp5sq'
const minerId = 'f010479'

// Run the check
const spark = new Spark()
const stats = {}
await spark.executeRetrievalCheck({ cid, minerId }, stats)
4 changes: 4 additions & 0 deletions test/integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,7 @@ test('retrieval check for our CID', async () => {
// TODO - spark-api does not record this field yet
// assertProp('carChecksum', '122069f03061f7ad4c14a5691b7e96d3ddd109023a6539a0b4230ea3dc92050e7136')
})

test('can execute manual check for our CID', async () => {
await import('../manual-check.js')
})