endojs / endo

Endo is a distributed secure JavaScript sandbox, based on SES
Apache License 2.0
788 stars 70 forks source link

refactor(daemon): Refactor pet store id to name mapping #2187

Closed rekmarks closed 4 months ago

rekmarks commented 4 months ago

Refactors the pet store's id to name mapping by replacing its multiple internal maps with a bidirectional multimap. Also fixes what is probably a bug in the follow() functionality, where add and remove events were published for redundant write() calls. Tests of the existing behavior were added before the refactor, then updated for the new behavior.

Note: The bidirectional multimap may also be used for followReverseLocate(), which will be introduced in a follow-up.