Skip to content

Commit 50b8611

Browse files
committed
f - Fill in inflight_htlc_msat from used_channel_liquidities
1 parent a4c3696 commit 50b8611

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lightning/src/routing/router.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1312,9 +1312,11 @@ where L::Target: Logger {
13121312
hop_used = false;
13131313
}
13141314

1315+
let used_liquidity_msat = used_channel_liquidities
1316+
.get(&(hop.short_channel_id, source < target)).copied().unwrap_or(0);
13151317
let channel_usage = ChannelUsage {
13161318
amount_msat: final_value_msat + aggregate_next_hops_fee_msat,
1317-
inflight_htlc_msat: 0,
1319+
inflight_htlc_msat: used_liquidity_msat,
13181320
effective_capacity: candidate.effective_capacity(),
13191321
};
13201322
let channel_penalty_msat = scorer.channel_penalty_msat(

0 commit comments

Comments
 (0)