]> git.bitcoin.ninja Git - rust-lightning/commit
Generalize CustomOnionMessageContents trait
authorJeffrey Czyz <jkczyz@gmail.com>
Tue, 19 Sep 2023 17:35:13 +0000 (12:35 -0500)
committerJeffrey Czyz <jkczyz@gmail.com>
Wed, 18 Oct 2023 23:15:05 +0000 (18:15 -0500)
commit840efd533468cf7cacd8b4bab27ce2db86b3eb93
tree5499b22eff87e784428a38c8c56dbc5068cd3e7f
parent94573dda33c2e6bf55b2f28ffe7fbdf0a37f6edc
Generalize CustomOnionMessageContents trait

Rename CustomOnionMessageContents to OnionMessageContents and use it as
a trait bound on messages passed to OnionMessenger methods. This allows
using the trait in an upcoming commit as a bound on the contents of
PendingOnionMessage.

Also, make ParsedOnionMessageContent implement OnionMessageContents so
that Payload can be bounded by OnionMessageContents directly, but used
when either reading a ParsedOnionMessageContent or writing a specific
type of OnionMessageContents (e.g., OffersMessage).
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/offers.rs
lightning/src/onion_message/packet.rs