diff --git a/packages/SwingSet/src/kernel/vatManager/nodeWorker.js b/packages/SwingSet/src/kernel/vatManager/nodeWorker.js index a8f28b265b3..f70d11839cb 100644 --- a/packages/SwingSet/src/kernel/vatManager/nodeWorker.js +++ b/packages/SwingSet/src/kernel/vatManager/nodeWorker.js @@ -33,7 +33,9 @@ export function makeNodeWorkerVatManagerFactory(tools) { // TODO: warn+ignore, rather than throw, because the kernel enables it // for all vats, because the Spawner still needs it. When the kernel // stops doing that, turn this into a regular assert - console.log(`node-worker does not support enableInternalMetering`); + console.log( + `node-worker does not support enableInternalMetering, ignoring`, + ); } const vatKeeper = kernelKeeper.getVatKeeper(vatID); const transcriptManager = makeTranscriptManager( @@ -135,9 +137,16 @@ export function makeNodeWorkerVatManagerFactory(tools) { return pr.promise; } - function replayTranscript() { - // TODO unimplemented - throw Error(`replayTranscript not yet implemented`); + async function replayTranscript() { + transcriptManager.startReplay(); + for (const t of vatKeeper.getTranscript()) { + transcriptManager.checkReplayError(); + transcriptManager.startReplayDelivery(t.syscalls); + // eslint-disable-next-line no-await-in-loop + await deliver(t.d); + } + transcriptManager.checkReplayError(); + transcriptManager.finishReplay(); } function shutdown() { diff --git a/packages/SwingSet/src/kernel/vatManager/worker-subprocess-node.js b/packages/SwingSet/src/kernel/vatManager/worker-subprocess-node.js index cae4d9e1c00..990e21aac9d 100644 --- a/packages/SwingSet/src/kernel/vatManager/worker-subprocess-node.js +++ b/packages/SwingSet/src/kernel/vatManager/worker-subprocess-node.js @@ -34,7 +34,9 @@ export function makeNodeSubprocessFactory(tools) { // TODO: warn+ignore, rather than throw, because the kernel enables it // for all vats, because the Spawner still needs it. When the kernel // stops doing that, turn this into a regular assert - console.log(`node-worker does not support enableInternalMetering`); + console.log( + `node-worker does not support enableInternalMetering, ignoring`, + ); } const vatKeeper = kernelKeeper.getVatKeeper(vatID); const transcriptManager = makeTranscriptManager( @@ -135,9 +137,16 @@ export function makeNodeSubprocessFactory(tools) { return pr.promise; } - function replayTranscript() { - // TODO unimplemented - throw Error(`replayTranscript not yet implemented`); + async function replayTranscript() { + transcriptManager.startReplay(); + for (const t of vatKeeper.getTranscript()) { + transcriptManager.checkReplayError(); + transcriptManager.startReplayDelivery(t.syscalls); + // eslint-disable-next-line no-await-in-loop + await deliver(t.d); + } + transcriptManager.checkReplayError(); + transcriptManager.finishReplay(); } function shutdown() {