Skip to content

Commit

Permalink
feat: augment kernelDump to account for dynamic vat schema additions
Browse files Browse the repository at this point in the history
  • Loading branch information
FUDCo committed Aug 26, 2020
1 parent 3719907 commit b7dde66
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/swingset-runner/src/dumpstore.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export function dumpStore(store, outfile, rawMode) {

p('// vat info');
popt('vat.nextID');
const vatDynamicIDsRaw = popt('vat.dynamicIDs');
const vats = new Map();
const vatNamesRaw = popt('vat.names');
if (vatNamesRaw) {
Expand All @@ -71,6 +72,14 @@ export function dumpStore(store, outfile, rawMode) {
const v = popt(`vat.name.${vn}`);
vats.set(vn, v);
}
}
if (vatDynamicIDsRaw) {
const vatDynamicIDs = JSON.parse(vatDynamicIDsRaw);
for (const vdid of vatDynamicIDs) {
vats.set(`dynamic-${vdid}`, vdid);
}
}
if (vatNamesRaw || vatDynamicIDsRaw) {
gap();
}

Expand All @@ -92,6 +101,8 @@ export function dumpStore(store, outfile, rawMode) {
gap();
}
p(`// vat ${v} (${vn})`);
popt(`${v}.options`);
popt(`${v}.source`);
popt(`${v}.d.nextID`);
popt(`${v}.o.nextID`);
popt(`${v}.p.nextID`);
Expand Down

0 comments on commit b7dde66

Please sign in to comment.