Skip to content

Commit

Permalink
fix: fail hard if there is no $BOOT_ADDRESS
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig authored and warner committed May 4, 2020
1 parent 34d6af0 commit 515aee4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/cosmic-swingset/lib/chain-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default async function main(progname, args, { path, env, agcc }) {
},
rej => {
// console.error(`Rejecting in Node to ${str} with`, rej);
replier.reject(`rejection ignored: ${rej.stack || rej}`);
replier.reject(`${(rej && rej.stack) || rej}`);
},
);
}
Expand Down Expand Up @@ -200,6 +200,9 @@ export default async function main(progname, args, { path, env, agcc }) {
// console.log(`toSwingSet`, action, replier);
if (action.type === AG_COSMOS_INIT) {
// console.error('got AG_COSMOS_INIT', action);
if (!process.env.BOOT_ADDRESS) {
throw Error(`You must set $BOOT_ADDRESS to run a chain node`);
}
portNums.dibc = action.ibcPort;
return true;
}
Expand Down

0 comments on commit 515aee4

Please sign in to comment.