Skip to content

Commit

Permalink
Revert "feat(zoe): cache bundles in bundleAndInstall of setUpZoeForTest"
Browse files Browse the repository at this point in the history
This reverts commit c8b8d44.
  • Loading branch information
dckc committed Nov 27, 2024
1 parent e049c85 commit cee89d6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/zoe/tools/setup-zoe.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { E, makeLoopback } from '@endo/captp';

import { makeScalarBigMapStore } from '@agoric/vat-data';
import { makeNodeBundleCache } from '@endo/bundle-source/cache.js';
import bundleSource from '@endo/bundle-source';
import { makeDurableZoeKit } from '../src/zoeService/zoe.js';
import fakeVatAdmin, { makeFakeVatAdmin } from './fakeVatAdmin.js';

Expand Down Expand Up @@ -31,14 +31,12 @@ export const makeZoeForTest = vatAdminSvc =>
* @param {FeeIssuerConfig} [options.feeIssuerConfig]
* @param {VatAdminSvc} [options.vatAdminSvc]
* @param {boolean} [options.useNearRemote]
* @param {string} [options.bundlesDir]
*/
export const setUpZoeForTest = async ({
setJig = () => {},
feeIssuerConfig,
vatAdminSvc,
useNearRemote = false,
bundlesDir = 'bundles',
} = {}) => {
const { makeFar, makeNear } = makeLoopback('zoeTest');

Expand All @@ -58,14 +56,12 @@ export const setUpZoeForTest = async ({
}),
);

const bundleCache = await makeNodeBundleCache(bundlesDir, {}, s => import(s));

/**
* @param {string} path
* @returns {Promise<Installation>}
*/
const bundleAndInstall = async path => {
const bundle = await bundleCache.load(path);
const bundle = await bundleSource(path);
const id = `b1-${path}`;
assert(vatAdminState, 'installBundle called before vatAdminState defined');
vatAdminState.installBundle(id, bundle);
Expand Down

0 comments on commit cee89d6

Please sign in to comment.