Skip to content

Commit

Permalink
feat!: add multiple home.ibcports
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed May 2, 2020
1 parent 61b0975 commit 7c9cc18
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions packages/cosmic-swingset/lib/ag-solo/vats/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import {
import { GCI } from './gci';
import { makeBridgeManager } from './bridge';

const NUM_IBC_PORTS = 3;

console.debug(`loading bootstrap.js`);

function parseArgs(argv) {
Expand Down Expand Up @@ -101,14 +103,18 @@ export default function setup(syscall, state, helpers) {
);
return harden({
async createUserBundle(_nickname) {
// Bind to a fresh port (unspecified name) on the IBC implementation
// and provide it for the user to have.
const ibcport = await E(vats.network).bind('/ibc-port/');
// Bind to some fresh ports (unspecified name) on the IBC implementation
// and provide them for the user to have.
const ibcports = [];
for (let i = 0; i < NUM_IBC_PORTS; i += 1) {
// eslint-disable-next-line no-await-in-loop
ibcports.push(await E(vats.network).bind('/ibc-port/'));
}
const bundle = harden({
chainTimerService,
sharingService,
contractHost,
ibcport,
ibcports,
registrar: registry,
registry,
zoe,
Expand Down

0 comments on commit 7c9cc18

Please sign in to comment.