#####Problem:
-
Agent
Ahas an addressaddA. The addressaddAalso has an aliasesaddA'. -
When
Astarts, it usesaddAas its address, so it computes its id =ID(addA) -
Another agent
Bstarts, it wants to joinA, but it only knows the aliases address ofA, that isaddA', so it uses this address to to compute the id ofA, which isID(addA'). -
Later, when
AandBexchange information,Awill see an id =ID(addA'), and treat it as a different node from itself, thusAwill then send message to itself.
#####To solve the problem:
No one should compute other's id, it should only get the id from the owner.