Skip to content

Commit

Permalink
fixup! feat: Add consensus-independent vat transcript archiving confi…
Browse files Browse the repository at this point in the history
…guration to AG_COSMOS_INIT
  • Loading branch information
gibson042 committed Sep 11, 2024
1 parent ac99cd3 commit 4dcdb4f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/SwingSet/src/kernel/kernel.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ export default function buildKernel(
console.log(`kernel terminating vat ${vatID} (failure=${shouldReject})`);
let critical = false;
insistCapData(info);
await null;
const deferred = [];
// ISSUE: terminate stuff in its own crank like creation?
// TODO: if a static vat terminates, panic the kernel?
// TODO: guard against somebody telling vatAdmin to kill a vat twice
Expand All @@ -288,11 +288,12 @@ export default function buildKernel(
// remove vatID from the list of live vats, and mark for deletion
kernelKeeper.deleteVatID(vatID);
kernelKeeper.markVatAsTerminated(vatID);
await kernelKeeper.removeVatFromSwingStoreExports(vatID);
deferred.push(kernelKeeper.removeVatFromSwingStoreExports(vatID));
for (const kpid of deadPromises) {
resolveToError(kpid, makeError('vat terminated'), vatID);
}
}
await Promise.all(deferred);
if (critical) {
// The following error construction is a bit awkward, but (1) it saves us
// from doing unmarshaling while in the kernel, while (2) it protects
Expand Down

0 comments on commit 4dcdb4f

Please sign in to comment.