From b1b67b092f9dbd5155dc62a12b2f8cb4d5b9e6b5 Mon Sep 17 00:00:00 2001 From: Santiago Palladino Date: Mon, 6 Jan 2025 20:00:41 -0300 Subject: [PATCH] chore: Fix invalid random log id (#11076) Calling `LogId.random` would sometimes return an invalid instance. Spotted by @charlielye. --- yarn-project/circuit-types/src/logs/log_id.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn-project/circuit-types/src/logs/log_id.ts b/yarn-project/circuit-types/src/logs/log_id.ts index fe718fb3821..ec1080799ce 100644 --- a/yarn-project/circuit-types/src/logs/log_id.ts +++ b/yarn-project/circuit-types/src/logs/log_id.ts @@ -34,7 +34,7 @@ export class LogId { static random() { return new LogId( - Math.floor(Math.random() * 1000), + Math.floor(Math.random() * 1000) + 1, Math.floor(Math.random() * 1000), Math.floor(Math.random() * 100), );