mirror of
https://github.com/lightningnetwork/lnd.git
synced 2026-08-16 13:00:19 +02:00
In this commit we add FindPath, a BFS-based shsortest-path algorithm that finds routes through the channel graph for onion messages. The search filters nodes by the OnionMessage feature bits (38/39). We also add a unit tests covering: direct neighbor routing, multi-hop paths, feature-bit filtering, missing destination nodes, destination without onion support, max hop limits, cycle handling, and shortest-path selection. choice of BFS is because there isn't any weight involve. |
||
|---|---|---|
| .. | ||
| actor.go | ||
| actor_test.go | ||
| errors.go | ||
| hop.go | ||
| hop_test.go | ||
| interfaces.go | ||
| log.go | ||
| onion_endpoint.go | ||
| pathfind.go | ||
| pathfind_test.go | ||
| ratelimit.go | ||
| ratelimit_test.go | ||
| resolver.go | ||
| resolver_test.go | ||
| test_utils.go | ||