Fix sender is the introduction node onion messages
authorJeffrey Czyz <jkczyz@gmail.com>
Tue, 19 Mar 2024 21:04:43 +0000 (16:04 -0500)
committerJeffrey Czyz <jkczyz@gmail.com>
Tue, 19 Mar 2024 22:40:25 +0000 (17:40 -0500)
commitf2b84e05e8e0d5a2d6542dd6555a6252a800eb26
treec7609ddb63d3e6c62b1939a60f37cf31861bcb16
parentdc627b371fa5dd5db5b5da65ad445bf01359ec2a
Fix sender is the introduction node onion messages

DefaultMessageRouter will form an OnionMessagePath from a BlindedPath
where the sender is the introduction node but only if the sender is
announced. If the sender is unannounced, then DefaultMessageRouter will
fail. While DefaultMessageRouter will only create a blinded path with an
announced introduction node, it may receive one where the introduction
node is unannounced. Don't return an error in this case, as the
OnionMessenger can advance the blinded path by one hop.

This may occur when two nodes have an unannounced channel and one (the
offer creator) wants to use it for payments without an intermediary node
and without putting its node id in the offer.
lightning/src/onion_message/messenger.rs