Skip to content

Commit

Permalink
Increase max default EMULATED_BLOCKS_MAX_WAIT
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastienGllmt committed Nov 10, 2023
1 parent c58361d commit 61bd775
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/paima-sdk/paima-utils/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 61bd775

Please sign in to comment.