From 50fda75f54adb4558cadb97aec76d2b1c85a67e3 Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Mon, 2 Dec 2024 15:35:20 -0500 Subject: [PATCH] refactor: Cleanup #10348 https://github.com/Agoric/agoric-sdk/pull/10348#discussion_r1855204572 --- packages/cosmic-swingset/src/computron-counter.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/cosmic-swingset/src/computron-counter.js b/packages/cosmic-swingset/src/computron-counter.js index 4db024ca7a0..c21f4150be1 100644 --- a/packages/cosmic-swingset/src/computron-counter.js +++ b/packages/cosmic-swingset/src/computron-counter.js @@ -50,10 +50,7 @@ export function computronCounter( const defaultCleanupBudget = remainingCleanups.default; let cleanupStarted = false; let cleanupDone = false; - const cleanupPossible = - Object.values(remainingCleanups).length > 0 - ? Object.values(remainingCleanups).some(n => n > 0) - : defaultCleanupBudget > 0; + const cleanupPossible = Object.values(remainingCleanups).some(n => n > 0); if (!cleanupPossible) cleanupDone = true; /** @type {() => (false | import('@agoric/swingset-vat').CleanupBudget)} */ const allowCleanup = () =>