Skip to content

Commit

Permalink
fixup! refactor!: Add mailbox types and differentiate use of maps fro…
Browse files Browse the repository at this point in the history
…m map-like stores
  • Loading branch information
gibson042 committed Oct 17, 2024
1 parent 5003804 commit 4128aef
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions packages/boot/tools/supports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ import {
import type { ExecutionContext as AvaT } from 'ava';

import type { CoreEvalSDKType } from '@agoric/cosmic-proto/swingset/swingset.js';
import type { KVStore } from '@agoric/cosmic-swingset/src/helpers/bufferedStorage.js';
import type { EconomyBootstrapPowers } from '@agoric/inter-protocol/src/proposals/econ-behaviors.js';
import type { Mailbox } from '@agoric/swingset-vat';
import type { SwingsetController } from '@agoric/swingset-vat/src/controller/controller.js';
import type { BridgeHandler, IBCMethod } from '@agoric/vats';
import type { BootstrapRootObject } from '@agoric/vats/src/core/lib-boot.js';
Expand Down Expand Up @@ -513,15 +511,9 @@ export const makeSwingsetTestKit = async (
},
});
}
/** @type {KVStore<Mailbox>} */
const mailboxStorage = Object.assign(new Map(), {
getNextKey: previousKey => {
for (const k of mailboxStorage.keys()) {
if (k > previousKey) return k;
}
},
});
const mailboxStorage = new Map();
const { controller, timer, bridgeInbound } = await buildSwingset(
// @ts-expect-error missing method 'getNextKey'
mailboxStorage,
bridgeOutbound,
kernelStorage,
Expand Down

0 comments on commit 4128aef

Please sign in to comment.