X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fblinded_path%2Fmod.rs;h=b1fc9e1c0a443c36cbb5d3a772ac944a869d7268;hb=7c9463668a4f71663746e57bdb09ee6b91797d5a;hp=896999799fbebed4456f8c53768881698d4e581f;hpb=6dc42235baaa22320ad78d3e05fab31edad99328;p=rust-lightning diff --git a/lightning/src/blinded_path/mod.rs b/lightning/src/blinded_path/mod.rs index 89699979..b1fc9e1c 100644 --- a/lightning/src/blinded_path/mod.rs +++ b/lightning/src/blinded_path/mod.rs @@ -57,7 +57,7 @@ pub struct BlindedHop { impl BlindedPath { /// Create a one-hop blinded path for a message. - pub fn one_hop_for_message( + pub fn one_hop_for_message( recipient_node_id: PublicKey, entropy_source: &ES, secp_ctx: &Secp256k1 ) -> Result { Self::new_for_message(&[recipient_node_id], entropy_source, secp_ctx) @@ -68,7 +68,7 @@ impl BlindedPath { /// /// Errors if no hops are provided or if `node_pk`(s) are invalid. // TODO: make all payloads the same size with padding + add dummy hops - pub fn new_for_message( + pub fn new_for_message( node_pks: &[PublicKey], entropy_source: &ES, secp_ctx: &Secp256k1 ) -> Result { if node_pks.is_empty() { return Err(()) } @@ -84,7 +84,7 @@ impl BlindedPath { } /// Create a one-hop blinded path for a payment. - pub fn one_hop_for_payment( + pub fn one_hop_for_payment( payee_node_id: PublicKey, payee_tlvs: payment::ReceiveTlvs, entropy_source: &ES, secp_ctx: &Secp256k1 ) -> Result<(BlindedPayInfo, Self), ()> { @@ -105,7 +105,7 @@ impl BlindedPath { /// /// [`ForwardTlvs`]: crate::blinded_path::payment::ForwardTlvs // TODO: make all payloads the same size with padding + add dummy hops - pub(crate) fn new_for_payment( + pub fn new_for_payment( intermediate_nodes: &[payment::ForwardNode], payee_node_id: PublicKey, payee_tlvs: payment::ReceiveTlvs, htlc_maximum_msat: u64, entropy_source: &ES, secp_ctx: &Secp256k1