Skip to content

Commit

Permalink
Merge branch 'main' into manual-check-frisbii
Browse files Browse the repository at this point in the history
  • Loading branch information
bajtos authored Sep 10, 2024
2 parents 5df10d4 + d103cc5 commit a95457e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/constants.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const SPARK_VERSION = '1.14.2'
export const SPARK_VERSION = '1.14.3'
export const MAX_CAR_SIZE = 200 * 1024 * 1024 // 200 MB
export const APPROX_ROUND_LENGTH_IN_MS = 20 * 60_000 // 20 minutes
export const RPC_URL = 'https://api.node.glif.io/'
Expand Down
4 changes: 3 additions & 1 deletion lib/spark.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ export default class Spark {
const carBuffer = new ArrayBuffer(0, { maxByteLength: MAX_CAR_SIZE })
const carBytes = new Uint8Array(carBuffer)

stats.startAt = new Date()

try {
const url = getRetrievalUrl(protocol, address, cid)
console.log(`Fetching: ${url}`)
Expand Down Expand Up @@ -232,7 +234,7 @@ export default class Spark {
export function newStats () {
return {
timeout: false,
startAt: new Date(),
startAt: null,
firstByteAt: null,
endAt: null,
carTooLarge: false,
Expand Down
2 changes: 1 addition & 1 deletion test/integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ test('integration', async () => {
const res = await fetch(`https://api.filspark.com/measurements/${measurementId}`)
assert(res.ok)
const retrieval = await res.json()
assert(retrieval.startAt)
assert(retrieval.indexerResult)
assert(retrieval.finishedAt)
})

Expand Down

0 comments on commit a95457e

Please sign in to comment.