Skip to content

Commit

Permalink
f - check amount_msats against ChannelDetails::inbound_capacity_msat
Browse files Browse the repository at this point in the history
  • Loading branch information
jkczyz committed Dec 12, 2023
1 parent f9f8323 commit 9dc55eb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lightning/src/routing/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ impl<G: Deref<Target = NetworkGraph<L>> + Clone, L: Deref, S: Deref, SP: Sized,
first_hops.into_iter()
.filter(|details| details.is_public)
.filter(|details| details.counterparty.features.supports_route_blinding())
.filter(|details| amount_msats <= details.inbound_capacity_msat)
.filter(|details| amount_msats >= details.inbound_htlc_minimum_msat.unwrap_or(0))
.filter(|details| amount_msats <= details.inbound_htlc_maximum_msat.unwrap_or(0))
.filter(|details| network_graph
Expand Down

0 comments on commit 9dc55eb

Please sign in to comment.