Skip to content

Commit

Permalink
fix: clear unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
anilhelvaci committed Oct 24, 2024
1 parent 48f8017 commit baff9e6
Showing 1 changed file with 4 additions and 22 deletions.
26 changes: 4 additions & 22 deletions a3p-integration/proposals/z:acceptance/test-lib/vat-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -114,7 +100,3 @@ export const snapshotVat = vatName => {

return snapshots;
};

export const swingStore = makeSwingstore(
dbOpenAmbient(swingstorePath.replace(/^~/, HOME), { readonly: true }),
);

0 comments on commit baff9e6

Please sign in to comment.