Skip to content

Commit 4c297c9

Browse files
committed
Implement Readable for Responder
A future InvoiceReceived event will include a Responder. Since Event implements Readable, so must Responder.
1 parent bfdfb9d commit 4c297c9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lightning/src/onion_message/messenger.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,12 +325,18 @@ impl OnionMessageRecipient {
325325

326326
/// The `Responder` struct creates an appropriate [`ResponseInstruction`]
327327
/// for responding to a message.
328+
#[derive(Clone, Debug, Eq, PartialEq)]
328329
pub struct Responder {
329330
/// The path along which a response can be sent.
330331
reply_path: BlindedPath,
331332
path_id: Option<[u8; 32]>
332333
}
333334

335+
impl_writeable_tlv_based!(Responder, {
336+
(0, reply_path, required),
337+
(2, path_id, option),
338+
});
339+
334340
impl Responder {
335341
/// Creates a new [`Responder`] instance with the provided reply path.
336342
pub(super) fn new(reply_path: BlindedPath, path_id: Option<[u8; 32]>) -> Self {

0 commit comments

Comments
 (0)