@@ -95,7 +95,7 @@ impl<G: Deref<Target = NetworkGraph<L>>, L: Deref, ES: Deref, S: Deref, SP: Size
95
95
T : secp256k1:: Signing + secp256k1:: Verification
96
96
> (
97
97
& 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 >
99
99
) -> Result < Vec < BlindedPaymentPath > , ( ) > {
100
100
// Limit the number of blinded paths that are computed.
101
101
const MAX_PAYMENT_PATHS : usize = 3 ;
@@ -120,9 +120,9 @@ impl<G: Deref<Target = NetworkGraph<L>>, L: Deref, ES: Deref, S: Deref, SP: Size
120
120
121
121
let paths = first_hops. into_iter ( )
122
122
. 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 ) )
126
126
// Limit to peers with announced channels unless the recipient is unannounced.
127
127
. filter ( |details| network_graph
128
128
. node ( & NodeId :: from_pubkey ( & details. counterparty . node_id ) )
@@ -218,7 +218,7 @@ pub trait Router {
218
218
T : secp256k1:: Signing + secp256k1:: Verification
219
219
> (
220
220
& 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 >
222
222
) -> Result < Vec < BlindedPaymentPath > , ( ) > ;
223
223
}
224
224
0 commit comments