Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(daemon): in mail remove redundant SELF lookup #2085

Merged
merged 1 commit into from
Feb 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions packages/daemon/src/mail.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,20 +128,16 @@ export const makeMailboxMaker = ({
// naming hub's formula identifier and the pet name path.
// A "naming hub" is an objected with a variadic lookup method. It includes
// objects such as guests and hosts.
const hubFormulaIdentifier = identifyLocal('SELF');
if (hubFormulaIdentifier === undefined) {
throw new Error('No SELF found during LookupFormula creation.');
}
const digester = makeSha512();
digester.updateText(`${hubFormulaIdentifier},${petNamePath.join(',')}`);
digester.updateText(`${selfFormulaIdentifier},${petNamePath.join(',')}`);
const lookupFormulaNumber = digester.digestHex();

// TODO:lookup Check if the lookup formula already exists in the store
/** @type {import('./types.js').LookupFormula} */
const lookupFormula = {
/** @type {'lookup'} */
type: 'lookup',
hub: hubFormulaIdentifier,
hub: selfFormulaIdentifier,
path: petNamePath,
};

Expand Down
Loading