From 124bb026fba4121083a217b1e7022cf5aca3de3d Mon Sep 17 00:00:00 2001 From: Shresth Agrawal Date: Sun, 22 Oct 2023 14:04:15 +0200 Subject: [PATCH] fix: beacon api sync update limits --- src/provers/beacon-api-light/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/provers/beacon-api-light/client.ts b/src/provers/beacon-api-light/client.ts index ea1fb51..8ad19f9 100644 --- a/src/provers/beacon-api-light/client.ts +++ b/src/provers/beacon-api-light/client.ts @@ -28,7 +28,7 @@ export class BeaconAPIProver implements IProver { const _cacheCount = Math.min(currentPeriod - period + 1, cacheCount); if (!this.cachedSyncUpdate.has(period)) { const vals = await this._getSyncUpdates(period, _cacheCount); - for (let i = 0; i < _cacheCount; i++) { + for (let i = 0; i < vals.length; i++) { this.cachedSyncUpdate.set(period + i, vals[i]); } }