Skip to content

Commit

Permalink
fix(swingset): record cranks and crankhash/activityhash in slog
Browse files Browse the repository at this point in the history
refs #3720
  • Loading branch information
warner committed Aug 18, 2021
1 parent 28a8ad8 commit 8bc08de
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/SwingSet/src/kernel/kernel.js
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,7 @@ export default function buildKernel(
console.error(`We're currently already running at`, processQueueRunning);
assert.fail(X`Kernel reentrancy is forbidden`);
}
kernelSlog.write({ type: 'crank-start', message });
/** @type { PolicyInput } */
let policyInput = ['none'];
try {
Expand Down Expand Up @@ -800,7 +801,14 @@ export default function buildKernel(
}
kernelKeeper.processRefcounts();
kernelKeeper.saveStats();
kernelKeeper.commitCrank();
const { crankhash, activityhash } = kernelKeeper.commitCrank();
const crankNum = kernelKeeper.getCrankNumber();
kernelSlog.write({
type: 'crank-finish',
crankNum,
crankhash,
activityhash,
});
kernelKeeper.incrementCrankNumber();
} finally {
processQueueRunning = undefined;
Expand Down

0 comments on commit 8bc08de

Please sign in to comment.