Skip to content

Commit

Permalink
fix: send nodeId when creating new node
Browse files Browse the repository at this point in the history
  • Loading branch information
Pranav2612000 committed Mar 25, 2024
1 parent 2504540 commit 3824f34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Network.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class Network {
this.nodes[this.nodes.length - 1]
);

this.broadcastFn(-1, { type: MESSAGE_TYPE.NEW_NODE }, -1);
this.broadcastFn(-1, { type: MESSAGE_TYPE.NEW_NODE, nodeId }, -1);
}

broadcastFn = async (senderIndex, msg, receiverIndex) => {
Expand Down

0 comments on commit 3824f34

Please sign in to comment.