diff --git a/a3p-integration/proposals/z:acceptance/test-lib/vat-helpers.js b/a3p-integration/proposals/z:acceptance/test-lib/vat-helpers.js index f4e42d8a3c62..f41a1243ab48 100644 --- a/a3p-integration/proposals/z:acceptance/test-lib/vat-helpers.js +++ b/a3p-integration/proposals/z:acceptance/test-lib/vat-helpers.js @@ -8,9 +8,12 @@ import { HOME, dbTool } from '@agoric/synthetic-chain'; const swingstorePath = '~/.agoric/data/agoric/swingstore.sqlite'; /** + * Initially from https://github.com/Agoric/agoric-3-proposals/blob/93bb953db209433499db08ae563942d1bf7eeb46/proposals/76%3Avaults-auctions/vatDetails.js#L36 + * but with small modifications + * * @param {import('better-sqlite3').Database} db */ -export const makeSwingstore = db => { +const makeSwingstore = db => { const sql = dbTool(db); /** @param {string} key */ @@ -65,23 +68,6 @@ const initSwingstore = () => { return makeSwingstore(dbOpenAmbient(fullPath, { readonly: true })); }; -/** - * @param {string} vatName - */ -export const getVatsWithSameName = async vatName => { - const kStore = initSwingstore(); - - const vatIDs = kStore.findVatsExact(vatName); - const vats = vatIDs.map(id => { - const vatLookup = kStore.lookupVat(id); - return { - options: vatLookup.options(), - currentSpan: vatLookup.currentSpan(), - }; - }); - return vats; -}; - /** * * @param {string} vatId @@ -114,7 +100,3 @@ export const snapshotVat = vatName => { return snapshots; }; - -export const swingStore = makeSwingstore( - dbOpenAmbient(swingstorePath.replace(/^~/, HOME), { readonly: true }), -);