Add Option<Vec<SocketAddress>> to OnionMessagePath
authorJeffrey Czyz <jkczyz@gmail.com>
Tue, 14 Nov 2023 21:30:17 +0000 (15:30 -0600)
committerJeffrey Czyz <jkczyz@gmail.com>
Wed, 6 Dec 2023 14:47:33 +0000 (08:47 -0600)
commit1114c3c5aaca7a0292a6416975ab94c17fe07cfb
tree0f8d65d4a647462f34566f06d8f2e7b36d086de8
parent17af8d5f0954c85163f881ce1c9cc49efbc582b1
Add Option<Vec<SocketAddress>> to OnionMessagePath

MessageRouter::find_path is given a Destination to reach via a set of
peers. If a path cannot be found, it may return a partial path such that
OnionMessenger can signal a direct connection to the first node in the
path is needed. Include a list of socket addresses in the returned
OnionMessagePath to allow OnionMessenger to know how to connect to the
node.

This allows DefaultMessageRouter to use its NetworkGraph to return
socket addresses for gossiped nodes.
fuzz/src/onion_message.rs
lightning/src/onion_message/functional_tests.rs
lightning/src/onion_message/messenger.rs