SharedKnowledge/ASAPJava

Bug: multi-hop Routing

Opened this issue · 0 comments

There is an issue with the multi-hop routing functionality.
The current implementation only forwards messages if the connection to the target peer is established after the message to forward has been received by the intermediate peer.
This means that if the connection to the target peer is established before the message is received, the message will not be forwarded.

I have created the class ConnectPeersMultiHopTest, which demonstrates the bug. There are two test cases:

  1. The first test shows the bug
  2. The second test shows that the message is forwarded if the connection to the intermediate peer is established after the message to forward is received.

Expected behavior:

Peer B should forward the message to Peer C regardless of when the connection to Peer C was established (whether the connection to Peer C was established before or after the message was received by Peer B).