Prefer well-connected nodes for introduction nodes
authorJeffrey Czyz <jkczyz@gmail.com>
Wed, 28 Feb 2024 17:23:56 +0000 (11:23 -0600)
committerJeffrey Czyz <jkczyz@gmail.com>
Wed, 28 Feb 2024 17:23:56 +0000 (11:23 -0600)
commit5e9a998194ca3f424d96acb0ffbbe9d3fd6b4f76
tree073ab178c103c367396a1e7375b6dd9740dbfebb
parent7ab438ddcc4eeccf84a4c80d982f0a3c025f2992
Prefer well-connected nodes for introduction nodes

When forming blinded paths, using a reliable node as the introduction
node is important to ensure onion message reliability. Order blinded
paths by how well-connected the introduction node is as a proxy for
reliability.

For short paths (e.g., when the sender and recipient share an LSP), this
may also result in a scenario where initiating a direct connection isn't
necessary. That is helpful when using RGS since it currently doesn't
include node announcements and thus cannot initiate a direct connection.
lightning/src/ln/offers_tests.rs
lightning/src/onion_message/messenger.rs