Skip to content

Commit

Permalink
fix(cosmic-swingset): Fix consensus failure on bundle parse errors
Browse files Browse the repository at this point in the history
Fixes #6169
  • Loading branch information
kriskowal committed Sep 16, 2022
1 parent a1dedea commit 01a26c8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/cosmic-swingset/src/launch-chain.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,13 @@ export async function launch({
}

async function installBundle(bundleSource) {
const bundle = JSON.parse(bundleSource);
let bundle;
try {
bundle = JSON.parse(bundleSource);
} catch (e) {
blockManagerConsole.warn('INSTALL_BUNDLE warn:', e);
return;
}
harden(bundle);

const error = await controller.validateAndInstallBundle(bundle).then(
Expand Down

0 comments on commit 01a26c8

Please sign in to comment.