Skip to content

Commit

Permalink
refactor(cosmic-swingset): Improve CrankerPhase values
Browse files Browse the repository at this point in the history
  • Loading branch information
gibson042 committed Oct 22, 2024
1 parent fb8a66a commit 91daea3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/cosmic-swingset/src/launch-chain.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const parseUpgradePlanInfo = (upgradePlan, prefix = '') => {
*/

/**
* @typedef {'leftover' | 'forced' | 'high-priority' | 'intermission' | 'queued' | 'cleanup'} CrankerPhase
* @typedef {'leftover' | 'forced' | 'high-priority' | 'timer' | 'queued' | 'cleanup'} CrankerPhase
* - leftover: work from a previous block
* - forced: work that claims the entirety of the current block
* - high-priority: queued work the precedes timer advancement
Expand Down Expand Up @@ -563,7 +563,7 @@ export async function launch({
const runPolicy = computronCounter(params, true);
const runSwingset = makeRunSwingset(blockHeight, runPolicy);

await runSwingset('queued');
await runSwingset('forced');
}

async function saveChainState() {
Expand Down Expand Up @@ -789,7 +789,7 @@ export async function launch({
// We must run the kernel even if nothing was added since the kernel
// only notes state exports and updates consistency hashes when attempting
// to perform a crank.
keepGoing = await runSwingset('intermission');
keepGoing = await runSwingset('timer');
if (!keepGoing) return;

// Finally, process as much as we can from the actionQueue.
Expand Down

0 comments on commit 91daea3

Please sign in to comment.