Skip to content

Commit

Permalink
fix(liveslots): better error message when buildRootObject is not Far
Browse files Browse the repository at this point in the history
  • Loading branch information
warner authored and dckc committed Jun 16, 2021
1 parent d05eeb2 commit 34568a9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/SwingSet/src/kernel/liveSlots.js
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,11 @@ function build(

// here we finally invoke the vat code, and get back the root object
const rootObject = buildRootObject(harden(vpow), harden(vatParameters));
assert.equal(passStyleOf(rootObject), 'remotable');
assert.equal(
passStyleOf(rootObject),
'remotable',
`buildRootObject() (${buildRootObject}) returned ${rootObject}, which is not Far`,
);

const rootSlot = makeVatSlot('object', true, BigInt(0));
valToSlot.set(rootObject, rootSlot);
Expand Down

0 comments on commit 34568a9

Please sign in to comment.