diff --git a/infra/fast-time/class-v3.mjs b/infra/fast-time/class-v3.mjs index 69fd8f685..ca0af9df9 100644 --- a/infra/fast-time/class-v3.mjs +++ b/infra/fast-time/class-v3.mjs @@ -94,13 +94,14 @@ async function stopAll() { for (const p of started) { try { p.kill('SIGKILL'); } catch { } } } process.on('SIGINT', async () => { await stopAll(); process.exit(130); }); +process.on('unhandledRejection', async (e) => { log(`FAILED: ${e?.stack || e}`); await stopAll(); process.exit(3); }); // a thrown start leaves no node behind const minerLog = (i) => { try { return readFileSync(`${TMP}/cpu${i}.log`, 'utf8').split('\n'); } catch { return []; } }; const t0 = Date.now(); const since = () => ((Date.now() - t0) / 1000).toFixed(1); const n0 = await new Node(0).start(); const n1 = await new Node(1, [`127.0.0.1:${n0.p2pPort}`]).start(); -const n2 = await new Node(2, [`127.0.0.1:${n0.p2pPort}`, `127.0.0.1:${n1.p2pPort}`]).start(); +const n2 = await new Node(2, [`127.0.0.1:${n0.p2pPort}`]).start(); // --connect takes one address const nodes = [n0, n1, n2]; for (const n of nodes) { const line = n.grepLog(/Program class v3 from the override file/)[0];