From 4c297c9a3ae72b4b2d4a041e80ad1608b58f4415 Mon Sep 17 00:00:00 2001 From: Jeffrey Czyz Date: Tue, 21 May 2024 14:32:40 -0500 Subject: [PATCH] Implement Readable for Responder A future InvoiceReceived event will include a Responder. Since Event implements Readable, so must Responder. --- lightning/src/onion_message/messenger.rs | 6 ++++++ 1 file changed, 6 insertions(+) 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 { -- 2.39.5