Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Mar 12, 2024
1 parent a31d0db commit 1a9de08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ export class RandomnessSingleton {

public getBytes(length: number): Buffer {
if (this.seed === undefined) {
// Note: It would be more natural to just have the contents of randomBytes(...) function from
// yarn-project/foundation/src/crypto/random/index.ts here but that would result in a larger
// refactor so I think prohibiting use of this func when the seed is undefined is and handling
// the singleton within randomBytes func is fine.
throw new Error('RandomnessSingleton is not implemented for non-deterministic mode');
}
const result = Buffer.alloc(length);
Expand Down

0 comments on commit 1a9de08

Please sign in to comment.