Skip to content

Commit 7c2fd41

Browse files
Consider max_htlc when determining effective capacity of route hint channels
Testing is added in the next commit.
1 parent c236c82 commit 7c2fd41

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lightning/src/routing/router.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,10 @@ impl<'a> CandidateRouteHop<'a> {
946946
liquidity_msat: details.next_outbound_htlc_limit_msat,
947947
},
948948
CandidateRouteHop::PublicHop { info, .. } => info.effective_capacity(),
949-
CandidateRouteHop::PrivateHop { .. } => EffectiveCapacity::Infinite,
949+
CandidateRouteHop::PrivateHop { hint } => {
950+
hint.htlc_maximum_msat.map_or(EffectiveCapacity::Infinite,
951+
|amt| EffectiveCapacity::MaximumHTLC { amount_msat: amt })
952+
}
950953
}
951954
}
952955
}

0 commit comments

Comments
 (0)