Skip to content

Commit

Permalink
fix: use incrementing counter for prover request ids
Browse files Browse the repository at this point in the history
  • Loading branch information
nflaig committed Jan 21, 2024
1 parent 0f375fa commit 44e14a7
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 44e14a7

Please sign in to comment.