Skip to content

Commit

Permalink
fix(daemon): Ensure guest store and worker nonces are unique
Browse files Browse the repository at this point in the history
When formula numbers were made unique, it appears we missed doing so
for the guest pet store and worker. This is no longer the case.
  • Loading branch information
rekmarks committed Feb 16, 2024
1 parent 3656123 commit 7db28de
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/daemon/src/daemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,10 @@ const makeEndoBootstrap = async (
context,
);
} else if (formula.type === 'guest') {
const storeFormulaIdentifier = `pet-store:${formulaNumber}`;
const workerFormulaIdentifier = `worker:${formulaNumber}`;
const storeFormulaNumber = derive(formulaNumber, 'pet-store');
const storeFormulaIdentifier = `pet-store:${storeFormulaNumber}`;
const workerFormulaNumber = derive(formulaNumber, 'worker');
const workerFormulaIdentifier = `worker:${workerFormulaNumber}`;
// Behold, recursion:
// eslint-disable-next-line no-use-before-define
return makeIdentifiedGuestController(
Expand Down

0 comments on commit 7db28de

Please sign in to comment.