nervosnetwork / fiber

21 stars 11 forks source link

Fix pay self issue in network graph path finding #302

Closed chenyukang closed 1 week ago

chenyukang commented 2 weeks ago

Fixes #300

We allowed A -> B -> A with the same channel before.

In ractor framework, when an actor handle sending another message which need to be handled by itself, there will be a loop in actor handler chain, pay self trigger this error because the forwarding TLC channel actor is same in our old code.

In this rare scenario, there will be no error but only the later message can not be handled, it's error-prone here.

In this fix, we don't allow to use same channel in the next jump for path finding.