From: Jeffrey Czyz Date: Tue, 21 May 2024 19:32:40 +0000 (-0500) Subject: Implement Readable for Responder X-Git-Tag: v0.0.124-beta~82^2~5 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=4c297c9a3ae72b4b2d4a041e80ad1608b58f4415;p=rust-lightning Implement Readable for Responder A future InvoiceReceived event will include a Responder. Since Event implements Readable, so must Responder. --- diff --git a/lightning/src/onion_message/messenger.rs b/lightning/src/onion_message/messenger.rs index ee49d00e9..0fb72c52d 100644 --- a/lightning/src/onion_message/messenger.rs +++ b/lightning/src/onion_message/messenger.rs @@ -325,12 +325,18 @@ impl OnionMessageRecipient { /// The `Responder` struct creates an appropriate [`ResponseInstruction`] /// for responding to a message. +#[derive(Clone, Debug, Eq, PartialEq)] pub struct Responder { /// The path along which a response can be sent. reply_path: BlindedPath, path_id: Option<[u8; 32]> } +impl_writeable_tlv_based!(Responder, { + (0, reply_path, required), + (2, path_id, option), +}); + impl Responder { /// Creates a new [`Responder`] instance with the provided reply path. pub(super) fn new(reply_path: BlindedPath, path_id: Option<[u8; 32]>) -> Self {