]> git.bitcoin.ninja Git - rust-lightning/commit
Parameterize OnionMessenger by new CustomOnionMessageHandler trait
authorValentine Wallace <vwallace@protonmail.com>
Mon, 17 Oct 2022 20:32:17 +0000 (16:32 -0400)
committerValentine Wallace <vwallace@protonmail.com>
Tue, 18 Oct 2022 15:39:39 +0000 (11:39 -0400)
commit75fd0f3cbbd1b788a8f9e3956ff78831669df55b
tree9f581a575b3a6555da1506f7e427292b4a34000e
parent2a8179edb79268b6804417f07f55706b23354097
Parameterize OnionMessenger by new CustomOnionMessageHandler trait

OnionMessenger::new will now take a custom onion message handler trait
implementation. This handler will be used in upcoming commit(s) to handle
inbound custom onion messages.

The new trait also specifies what custom messages are supported via its
associated type, CustomMessage. This associated type must implement a new
CustomOnionMessagesContents trait, which requires custom messages to support
being written, being read, and supplying their TLV type.
fuzz/src/onion_message.rs
lightning/src/ln/peer_handler.rs
lightning/src/onion_message/functional_tests.rs
lightning/src/onion_message/messenger.rs
lightning/src/onion_message/mod.rs
lightning/src/onion_message/packet.rs