Expand DefaultRouter's privacy docs

DefaultRouter::create_blinded_payment_paths may creat a one-hop blinded
path with the recipient as the introduction node. Update the privacy
section of DefaultRouter's docs to indicate this as is done in the docs
for DefaultMessageRouter.
This commit is contained in:
Jeffrey Czyz 2024-09-18 12:06:26 -05:00
parent 04c51b380d
commit bde331fe94
No known key found for this signature in database
GPG key ID: 912EF12EA67705F5

View file

@ -45,6 +45,11 @@ pub use lightning_types::routing::{RouteHint, RouteHintHop};
///
/// # Privacy
///
/// Creating [`BlindedPaymentPath`]s may affect privacy since, if a suitable path cannot be found,
/// it will create a one-hop path using the recipient as the introduction node if it is a announced
/// node. Otherwise, there is no way to find a path to the introduction node in order to send a
/// payment, and thus an `Err` is returned.
///
/// Implements [`MessageRouter`] by delegating to [`DefaultMessageRouter`]. See those docs for
/// privacy implications.
pub struct DefaultRouter<G: Deref<Target = NetworkGraph<L>>, L: Deref, ES: Deref, S: Deref, SP: Sized, Sc: ScoreLookUp<ScoreParams = SP>> where