Skip to content

Commit ae6f47a

Browse files
committed
f - check amount_msats against ChannelDetails::inbound_capacity_msat
1 parent 351951d commit ae6f47a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lightning/src/routing/router.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ impl<G: Deref<Target = NetworkGraph<L>> + Clone, L: Deref, S: Deref, SP: Sized,
101101
first_hops.into_iter()
102102
.filter(|details| details.is_public)
103103
.filter(|details| details.counterparty.features.supports_route_blinding())
104+
.filter(|details| amount_msats >= details.inbound_capacity_msat)
104105
.filter(|details| amount_msats >= details.inbound_htlc_minimum_msat.unwrap_or(0))
105106
.filter(|details| amount_msats <= details.inbound_htlc_maximum_msat.unwrap_or(0))
106107
.filter(|details| network_graph

0 commit comments

Comments
 (0)