Skip to content

Commit

Permalink
fix(swingset): stop rejecting metered=true for xs-worker
Browse files Browse the repository at this point in the history
Previously, any vat which wanted metering was forced to use worker=local,
even if they asked for something different. And worker=xs asserted that
metering was not requested. This removes both checks.

refs #2868
  • Loading branch information
warner committed Apr 26, 2021
1 parent 5e659e6 commit 3714ed9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/SwingSet/src/kernel/vatManager/factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export function makeVatManagerFactory({
enableSetup,
} = managerOptions;

if (metered && managerType !== 'local') {
if (metered && managerType !== 'local' && managerType !== 'xs-worker') {
console.warn(
`TODO: support metered with ${managerType}; using local as work-around`,
);
Expand All @@ -97,7 +97,7 @@ export function makeVatManagerFactory({
`TODO: stop using setup() with ${managerType}; using local as work-around`,
);
}
if (managerType === 'local' || metered || enableSetup) {
if (managerType === 'local' || enableSetup) {
if (setup) {
return localFactory.createFromSetup(
vatID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export function makeXsSubprocessFactory({
enableDisavow,
name,
} = managerOptions;
assert(!managerOptions.metered, 'xs-worker: metered not supported yet');
assert(
!managerOptions.enableSetup,
'xs-worker: enableSetup not supported at all',
Expand Down

0 comments on commit 3714ed9

Please sign in to comment.