From c6ae87332c2952932b5ca1629d77c7fed4411367 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_r1855150615 --- packages/boot/tools/supports.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/boot/tools/supports.ts b/packages/boot/tools/supports.ts index 967fe12d257..603b8f54cd0 100644 --- a/packages/boot/tools/supports.ts +++ b/packages/boot/tools/supports.ts @@ -681,19 +681,19 @@ export const makeRunPolicyProvider = () => { /** @type {ReturnType | undefined} */ let policy; - let counting = false; + let policyEnabled = false; const meter = harden({ provideRunPolicy: () => { - if (counting && !policy) { + if (policyEnabled && !policy) { policy = computronCounter({ beansPerUnit }); } return policy; }, - /** @param {boolean} x */ - usePolicy: x => { - counting = x; - if (!counting) { + /** @param {boolean} forceEnabled */ + usePolicy: forceEnabled => { + policyEnabled = forceEnabled; + if (!policyEnabled) { policy = undefined; } },