From 7e0441fc9c6f3f7b9171dd0358d495ecbcf167c1 Mon Sep 17 00:00:00 2001 From: Louis Bettens Date: Wed, 27 Sep 2023 18:53:59 +0200 Subject: [PATCH] format --- test/index.test.ts | 3 +-- web3-functions/vrf/index.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/test/index.test.ts b/test/index.test.ts index 29f4139..e57bfd5 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -109,9 +109,8 @@ describe("VRF Test Suite", function () { // Triggers pause condition for (let i = 0; i < 1001; ++i) ethers.provider.send("evm_mine", []); - // Spams requests, only the last MAX_RANGE * MAX_REQUESTS should be picked up - for (let i = 0; i < 1000; ++i) { + for (let i = 0; i < 1000; ++i) { await inbox.connect(user).requestRandomness(mockConsumer.address, data); } diff --git a/web3-functions/vrf/index.ts b/web3-functions/vrf/index.ts index a051cd4..3799646 100644 --- a/web3-functions/vrf/index.ts +++ b/web3-functions/vrf/index.ts @@ -23,7 +23,7 @@ const CALLBACK_ABI = [ const MAX_RANGE = 100; // limit range of events to comply with rpc providers const MAX_REQUESTS = 5; // limit number of requests on every execution to avoid hitting timeout const MAX_DEPTH = MAX_RANGE * MAX_REQUESTS; // How far the VRF should catch up with blocks -const MAX_DISTANCE = 1000; // Helpful to detect if the VRF has been paused not to recover too many blocks +const MAX_DISTANCE = 1000; // Helpful to detect if the VRF has been paused not to recover too many blocks Web3Function.onRun(async (context: Web3FunctionContext) => { const { userArgs, storage, multiChainProvider } = context;