Skip to content

Commit

Permalink
feat(SwingSet): support more managers with consensusMode
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Jul 14, 2021
1 parent 4eff4ff commit ea3280e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/SwingSet/src/kernel/vatManager/manager-local.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
makeSupervisorDispatch,
makeMeteredDispatch,
makeSupervisorSyscall,
makeVatConsole,
} from './supervisor-helper.js';

export function makeLocalVatManagerFactory(tools) {
Expand Down Expand Up @@ -91,6 +92,7 @@ export function makeLocalVatManagerFactory(tools) {
vatSyscallHandler,
) {
const {
consensusMode,
metered = false,
enableDisavow = false,
enableSetup = false,
Expand Down Expand Up @@ -148,7 +150,7 @@ export function makeLocalVatManagerFactory(tools) {
const endowments = harden({
...vatEndowments,
...ls.vatGlobals,
console: vatConsole,
console: makeVatConsole(vatConsole, !consensusMode),
assert,
});
const inescapableTransforms = [];
Expand Down
2 changes: 2 additions & 0 deletions packages/SwingSet/src/kernel/vatManager/manager-nodeworker.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export function makeNodeWorkerVatManagerFactory(tools) {

function createFromBundle(vatID, bundle, managerOptions, vatSyscallHandler) {
const {
consensusMode,
vatParameters,
virtualObjectCacheSize,
enableDisavow,
Expand Down Expand Up @@ -116,6 +117,7 @@ export function makeNodeWorkerVatManagerFactory(tools) {
virtualObjectCacheSize,
enableDisavow,
enableVatstore,
consensusMode,
]);

function deliverToWorker(delivery) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export function makeNodeSubprocessFactory(tools) {

function createFromBundle(vatID, bundle, managerOptions, vatSyscallHandler) {
const {
consensusMode,
vatParameters,
virtualObjectCacheSize,
enableDisavow,
Expand Down Expand Up @@ -111,6 +112,7 @@ export function makeNodeSubprocessFactory(tools) {
virtualObjectCacheSize,
enableDisavow,
enableVatstore,
consensusMode,
]);

function shutdown() {
Expand Down

0 comments on commit ea3280e

Please sign in to comment.