Skip to content

Commit

Permalink
fix(egress-client): set nonce, expire and fix servedAt
Browse files Browse the repository at this point in the history
  • Loading branch information
fforbeck committed Nov 22, 2024
1 parent 22bed68 commit f662770
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/middleware/withEgressClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,10 @@ async function record (space, resource, bytes, servedAt, env, ctx) {
nb: {
resource,
bytes,
servedAt: Math.floor(servedAt.getTime() / 1000)
servedAt: servedAt.getTime()
},
expiration: Infinity, // Don't expire the invocation, so we can record egress any time
nonce: process.hrtime().toString(),
proofs: ctx.delegationProofs
})
const res = await invocation.execute(connection)
Expand Down

0 comments on commit f662770

Please sign in to comment.