Skip to content

Commit

Permalink
fix: use incrementing counter for prover request ids (#6333)
Browse files Browse the repository at this point in the history
  • Loading branch information
nflaig committed Jan 22, 2024
1 parent 0f375fa commit 6f35ac6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/prover/src/utils/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ export class ELRpc {
private handler: ELRequestHandler;
private logger: Logger;

private requestId = 0;

constructor(handler: ELRequestHandler, logger: Logger) {
this.handler = handler;
this.logger = logger;
Expand Down Expand Up @@ -99,7 +101,6 @@ export class ELRpc {
}

getRequestId(): string {
// TODO: Find better way to generate random id
return (Math.random() * 100000000000000000).toFixed(0);
return (++this.requestId).toString();
}
}

0 comments on commit 6f35ac6

Please sign in to comment.