Skip to content

Commit

Permalink
refactor(vats): Delay invocation with E rather than `Promise.resolv…
Browse files Browse the repository at this point in the history
…e().then`
  • Loading branch information
gibson042 committed Dec 15, 2023
1 parent 6007a77 commit d956c30
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions packages/vats/src/core/chain-behaviors.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,9 @@ export const bridgeCoreEval = async allPowers => {
await Promise.all(
evals.map(coreEval => {
// Run in a new turn to avoid crosstalk of the evaluations.
return Promise.resolve()
.then(() => evaluateCoreEval(coreEval))
.catch(err => {
console.error('CORE_EVAL failed:', err);
throw err;
});
const evalP = E(evaluateCoreEval)(coreEval);
evalP.catch(err => console.error('CORE_EVAL failed:', err));
return evalP;
}),
);
},
Expand Down

0 comments on commit d956c30

Please sign in to comment.