lnd/onionmessage
Abdullahi Yunus fd25ba9853
onionmessage: add BFS pathfinding for onion messages
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.
2026-04-29 22:34:44 +01:00
..
actor.go onionmessage: drop onion messages cycling back to the sending peer 2026-04-17 12:33:08 +02:00
actor_test.go onionmessage: drop onion messages cycling back to the sending peer 2026-04-17 12:33:08 +02:00
errors.go onionmessage: add BFS pathfinding for onion messages 2026-04-29 22:34:44 +01:00
hop.go multi: actor-based onion message forwarding 2026-03-02 15:46:21 +01:00
hop_test.go multi: actor-based onion message forwarding 2026-03-02 15:46:21 +01:00
interfaces.go multi: OnionPeerActor for per-peer message support 2026-03-02 15:46:21 +01:00
log.go multi: endpoints for onion messages 2025-11-12 22:54:04 +08:00
onion_endpoint.go multi: actor-based onion message forwarding 2026-03-02 15:46:21 +01:00
pathfind.go onionmessage: add BFS pathfinding for onion messages 2026-04-29 22:34:44 +01:00
pathfind_test.go onionmessage: add BFS pathfinding for onion messages 2026-04-29 22:34:44 +01:00
ratelimit.go onionmessage: add token-bucket rate limiter primitives 2026-04-15 13:23:50 -07:00
ratelimit_test.go onionmessage: add token-bucket rate limiter primitives 2026-04-15 13:23:50 -07:00
resolver.go onionmessage: add LRU cache to SCID resolver 2026-03-02 15:46:21 +01:00
resolver_test.go multi: actor-based onion message forwarding 2026-03-02 15:46:21 +01:00
test_utils.go multi: actor-based onion message forwarding 2026-03-02 15:46:21 +01:00