@@ -95,7 +95,7 @@ impl<G: Deref<Target = NetworkGraph<L>>, L: Deref, ES: Deref, S: Deref, SP: Size
9595 T : secp256k1:: Signing + secp256k1:: Verification
9696 > (
9797 & self , recipient : PublicKey , first_hops : Vec < ChannelDetails > , tlvs : ReceiveTlvs ,
98- amount_msats : u64 , secp_ctx : & Secp256k1 < T >
98+ amount_msats : Option < u64 > , secp_ctx : & Secp256k1 < T >
9999 ) -> Result < Vec < BlindedPaymentPath > , ( ) > {
100100 // Limit the number of blinded paths that are computed.
101101 const MAX_PAYMENT_PATHS : usize = 3 ;
@@ -120,9 +120,9 @@ impl<G: Deref<Target = NetworkGraph<L>>, L: Deref, ES: Deref, S: Deref, SP: Size
120120
121121 let paths = first_hops. into_iter ( )
122122 . filter ( |details| details. counterparty . features . supports_route_blinding ( ) )
123- . filter ( |details| amount_msats <= details. inbound_capacity_msat )
124- . filter ( |details| amount_msats >= details. inbound_htlc_minimum_msat . unwrap_or ( 0 ) )
125- . filter ( |details| amount_msats <= details. inbound_htlc_maximum_msat . unwrap_or ( u64:: MAX ) )
123+ . filter ( |details| amount_msats. unwrap_or ( 0 ) <= details. inbound_capacity_msat )
124+ . filter ( |details| amount_msats. unwrap_or ( u64 :: MAX ) >= details. inbound_htlc_minimum_msat . unwrap_or ( 0 ) )
125+ . filter ( |details| amount_msats. unwrap_or ( 0 ) <= details. inbound_htlc_maximum_msat . unwrap_or ( u64:: MAX ) )
126126 // Limit to peers with announced channels unless the recipient is unannounced.
127127 . filter ( |details| network_graph
128128 . node ( & NodeId :: from_pubkey ( & details. counterparty . node_id ) )
@@ -218,7 +218,7 @@ pub trait Router {
218218 T : secp256k1:: Signing + secp256k1:: Verification
219219 > (
220220 & self , recipient : PublicKey , first_hops : Vec < ChannelDetails > , tlvs : ReceiveTlvs ,
221- amount_msats : u64 , secp_ctx : & Secp256k1 < T >
221+ amount_msats : Option < u64 > , secp_ctx : & Secp256k1 < T >
222222 ) -> Result < Vec < BlindedPaymentPath > , ( ) > ;
223223}
224224
0 commit comments