Add note about send and bcast test functions

This commit is contained in:
Hornwitser committed 2024-01-24 03:08:24 +01:00
1 parent 847945cfdd
commit 2a57ddb02e
1 file changed
+6
+6
View File
@@ -164,6 +164,9 @@ describe("Integration of link routing", function() {
* @param {Address} dst
*/
function send(link, dst, message) {
// This logic exists becasue .sendTo doesn't forward all kinds of
// messages to the correct location from all places. Idealy this
// would not be neccessary and .sendTo would do the right thing.
if (link instanceof Host) {
const instance = link.instanceConnections.get(dst.id);
if (instance) {
@@ -208,6 +211,9 @@ describe("Integration of link routing", function() {
* @param {"allHosts" | "allInstances" | "allControls"} dst
*/
function bcast(link, dst, message) {
// This logic exists becasue .sendTo doesn't forward all kinds of
// messages to the correct location from all places. Idealy this
// would not be neccessary and .sendTo would do the right thing.
if (link instanceof Host) {
const plugin = message.constructor.plugin;
if (dst === "allInstances") {