From 2e24974ebef47da17a76321a4542fb6dc8844291 Mon Sep 17 00:00:00 2001 From: Chip Morningstar Date: Tue, 6 Dec 2022 17:46:38 -0800 Subject: [PATCH] fix: correct merge goofiness --- packages/SwingSet/src/controller/initializeSwingset.js | 3 ++- packages/SwingSet/test/devices/test-devices.js | 2 +- packages/SwingSet/test/devices/test-raw-device.js | 2 +- packages/SwingSet/test/run-policy/test-run-policy.js | 2 +- packages/SwingSet/test/test-vpid-kernel.js | 1 - packages/SwingSet/test/vat-admin/test-create-vat.js | 1 + packages/SwingSet/test/virtualObjects/test-representatives.js | 2 +- 7 files changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/SwingSet/src/controller/initializeSwingset.js b/packages/SwingSet/src/controller/initializeSwingset.js index f18cfa045b6..5ed4ce20b86 100644 --- a/packages/SwingSet/src/controller/initializeSwingset.js +++ b/packages/SwingSet/src/controller/initializeSwingset.js @@ -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)); diff --git a/packages/SwingSet/test/devices/test-devices.js b/packages/SwingSet/test/devices/test-devices.js index 8320804bc34..ca3fa38232d 100644 --- a/packages/SwingSet/test/devices/test-devices.js +++ b/packages/SwingSet/test/devices/test-devices.js @@ -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); }); diff --git a/packages/SwingSet/test/devices/test-raw-device.js b/packages/SwingSet/test/devices/test-raw-device.js index ab0f6810b50..f3d6daf8fc5 100644 --- a/packages/SwingSet/test/devices/test-raw-device.js +++ b/packages/SwingSet/test/devices/test-raw-device.js @@ -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, diff --git a/packages/SwingSet/test/run-policy/test-run-policy.js b/packages/SwingSet/test/run-policy/test-run-policy.js index c598ebdc323..6b7cd5d2701 100644 --- a/packages/SwingSet/test/run-policy/test-run-policy.js +++ b/packages/SwingSet/test/run-policy/test-run-policy.js @@ -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(); diff --git a/packages/SwingSet/test/test-vpid-kernel.js b/packages/SwingSet/test/test-vpid-kernel.js index 3e2372fc888..09d128e4e68 100644 --- a/packages/SwingSet/test/test-vpid-kernel.js +++ b/packages/SwingSet/test/test-vpid-kernel.js @@ -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'; diff --git a/packages/SwingSet/test/vat-admin/test-create-vat.js b/packages/SwingSet/test/vat-admin/test-create-vat.js index 64390331b52..a383aa76b2c 100644 --- a/packages/SwingSet/test/vat-admin/test-create-vat.js +++ b/packages/SwingSet/test/vat-admin/test-create-vat.js @@ -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 diff --git a/packages/SwingSet/test/virtualObjects/test-representatives.js b/packages/SwingSet/test/virtualObjects/test-representatives.js index 97de5610854..ded29d94a22 100644 --- a/packages/SwingSet/test/virtualObjects/test-representatives.js +++ b/packages/SwingSet/test/virtualObjects/test-representatives.js @@ -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 {