From 61bd7754a7758f3ea27a5c0aa837d32507b8b801 Mon Sep 17 00:00:00 2001 From: Sebastien Date: Fri, 10 Nov 2023 17:32:58 +0300 Subject: [PATCH] Increase max default EMULATED_BLOCKS_MAX_WAIT --- packages/paima-sdk/paima-utils/src/config.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/paima-sdk/paima-utils/src/config.ts b/packages/paima-sdk/paima-utils/src/config.ts index 411e5aa78..3fb912a35 100644 --- a/packages/paima-sdk/paima-utils/src/config.ts +++ b/packages/paima-sdk/paima-utils/src/config.ts @@ -47,7 +47,10 @@ export class ENV { return process.env.EMULATED_BLOCKS === 'true'; } static get EMULATED_BLOCKS_MAX_WAIT(): number { - return parseFloat(process.env.EMULATED_BLOCKS_MAX_WAIT || `${ENV.BLOCK_TIME * 2.5}`); + // 20 seconds is just picked as a large value that is most likely safe as a default + // it's too long for a good UX, but it's also least likely to cause a crash + // if somebody knows they can safely set a smaller value, they can just override the default + return parseFloat(process.env.EMULATED_BLOCKS_MAX_WAIT || '20'); } // Security