Buffer onion messages requiring a connection
authorJeffrey Czyz <jkczyz@gmail.com>
Tue, 7 Nov 2023 14:17:46 +0000 (08:17 -0600)
committerJeffrey Czyz <jkczyz@gmail.com>
Wed, 6 Dec 2023 14:47:33 +0000 (08:47 -0600)
commitddee9289dce52065bcc0e8bf8ea3fcedd342627a
treecf51ef3cda5cb1e28ac70050055e793b99ca1a55
parent8412e8368c670176fbcac7e6fa1a98a3916972e6
Buffer onion messages requiring a connection

MessageRouter::find_path returns a path to use when sending an onion
message. If the first node on the path is not connected or does not
support onion messages, sending will fail with InvalidFirstHop. Instead
of failing outright, buffer the message for later sending once the first
node is a connected peer.
lightning/src/onion_message/messenger.rs