Skip to content

Commit

Permalink
fix: correct merge goofiness
Browse files Browse the repository at this point in the history
  • Loading branch information
FUDCo committed Dec 13, 2022
1 parent c63246f commit 2e24974
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion packages/SwingSet/src/controller/initializeSwingset.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,8 @@ export async function initializeSwingset(
) {
const kvStore = kernelStorage.kvStore;
insistStorageAPI(kvStore);
!swingsetIsInitialized(kernelStorage) || Fail`kernel store already initialized`;
!swingsetIsInitialized(kernelStorage) ||
Fail`kernel store already initialized`;

// copy config so we can safely mess with it even if it's shared or hardened
config = JSON.parse(JSON.stringify(config));
Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/test/devices/test-devices.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ test.serial('device state', async t => {
const d3 = c1.deviceNameToID('d3');
await c1.run();
t.deepEqual(c1.dump().log, ['undefined', 'w+r', 'called', 'got {"s":"new"}']);
const s = getAllState(hostStorage).kvStuff;
const s = getAllState(kernelStorage).kvStuff;
t.deepEqual(JSON.parse(s[`${d3}.deviceState`]), kser({ s: 'new' }));
t.deepEqual(JSON.parse(s[`${d3}.o.nextID`]), 10);
});
Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/test/devices/test-raw-device.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { test } from '../../tools/prepare-test-env-ava.js';

// eslint-disable-next-line import/order
import bundleSource from '@endo/bundle-source';
import { kunser } from '../../src/lib/kmarshal.js';
import { initSwingStore } from '@agoric/swing-store';
import { kunser } from '../../src/lib/kmarshal.js';

import {
initializeSwingset,
Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/test/run-policy/test-run-policy.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ async function testCranks(t, mode) {
await c.run(computronCounter(4_000_000n));
t.is(elapsedCranks(), 35);
const ckey = `${rightID}.vs.vc.1.sseqnum`;
const seqnum = JSON.parse(hostStorage.kvStore.get(ckey));
const seqnum = JSON.parse(kernelStorage.kvStore.get(ckey));
t.deepEqual(seqnum, kser(5));
} else if (mode === 'wallclock') {
const startMS = Date.now();
Expand Down
1 change: 0 additions & 1 deletion packages/SwingSet/test/test-vpid-kernel.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { test } from '../tools/prepare-test-env-ava.js';

import anylogger from 'anylogger';
import { Fail } from '@agoric/assert';
import { assert, details as X } from '@agoric/assert';
import { initSwingStore } from '@agoric/swing-store';
import { waitUntilQuiescent } from '../src/lib-nodejs/waitUntilQuiescent.js';

Expand Down
1 change: 1 addition & 0 deletions packages/SwingSet/test/vat-admin/test-create-vat.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ test('createVat holds refcount', async t => {
// calling getHeld doesn't immediately increment the refcount
const kpid1 = c.queueToVatRoot('bootstrap', 'getHeld', []);
await c.run();
expectedRefcount += 1; // from 'getHeld'
const h1 = kunser(c.kpResolution(kpid1));
const held = krefOf(h1);
t.is(held, 'ko27'); // gleaned from the logs, unstable, update as needed
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// eslint-disable-next-line import/order
import { test } from '../../tools/prepare-test-env-ava.js';

// eslint-disable-next-line import/order
import { M } from '@agoric/store';
import { initSwingStore } from '@agoric/swing-store';
import {
Expand Down

0 comments on commit 2e24974

Please sign in to comment.