Skip to content

Commit 9e46350

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

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
@@ -252,12 +252,18 @@ impl OnionMessageRecipient {
252252

253253
/// The `Responder` struct creates an appropriate [`ResponseInstruction`]
254254
/// for responding to a message.
255+
#[derive(Clone, Debug, Eq, PartialEq)]
255256
pub struct Responder {
256257
/// The path along which a response can be sent.
257258
reply_path: BlindedPath,
258259
path_id: Option<[u8; 32]>
259260
}
260261

262+
impl_writeable_tlv_based!(Responder, {
263+
(0, reply_path, required),
264+
(2, path_id, option),
265+
});
266+
261267
impl Responder {
262268
/// Creates a new [`Responder`] instance with the provided reply path.
263269
fn new(reply_path: BlindedPath, path_id: Option<[u8; 32]>) -> Self {

0 commit comments

Comments
 (0)