Skip to content

Commit d799607

Browse files
committed
Introduce BlindedPathType
1. Introduce a new enum that allows the user to specify the type of Blinded Path (whether Compact or Full-Length) when creating a Blinded Path. 2. This PR utilizes this new enum in two ways in the upcoming commits: - Allows explicitly providing the type of Blinded Path to be created instead of relying on the absolute expiry time for offers and refunds. - Simplifies the Blinded Path creation process by enabling a single function flow for creating both types of Blinded Path.
1 parent b023eed commit d799607

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lightning/src/onion_message/messenger.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,14 @@ pub enum MessageSendInstructions {
432432
},
433433
}
434434

435+
/// Represents the types of [`BlindedMessagePath`] that can be created.
436+
pub enum BlindedPathType {
437+
/// Whether the created [`BlindedMessagePath`]s are compact.
438+
Compact,
439+
/// Whether the created [`BlindedMessagePath`]s are full-length.
440+
Full,
441+
}
442+
435443
/// A trait defining behavior for routing an [`OnionMessage`].
436444
pub trait MessageRouter {
437445
/// Returns a route for sending an [`OnionMessage`] to the given [`Destination`].

0 commit comments

Comments
 (0)