Skip to content

Commit

Permalink
ensure all promisses are settled
Browse files Browse the repository at this point in the history
  • Loading branch information
pablomendezroyo committed Jan 31, 2025
1 parent 9af3f28 commit 601075f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@ export async function createStakerNetworkAndConnectStakerPkgs(
): Promise<void> {
for (const network of Object.values(Network)) {
await createDockerStakerNetwork(params.DOCKER_STAKER_NETWORKS[network]);
await Promise.all([
const results = await Promise.allSettled([
await execution.persistSelectedExecutionIfInstalled(network),
await consensus.persistSelectedConsensusIfInstalled(network),
await signer.persistSignerIfInstalledAndRunning(network),
await mevBoost.persistMevBoostIfInstalledAndRunning(network)
]);

const errors = results.filter((result) => result.status === "rejected").map((result) => result.reason);
logs.error(`Errors while connecting staker packages to the network ${network}`, errors);
}
}

Expand Down

0 comments on commit 601075f

Please sign in to comment.