Skip to content

Commit

Permalink
f - Fill in inflight_htlc_msat from used_channel_liquidities
Browse files Browse the repository at this point in the history
  • Loading branch information
jkczyz committed May 19, 2022
1 parent e511ba7 commit 9e2da63
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lightning/src/routing/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1275,9 +1275,11 @@ where L::Target: Logger {
hop_used = false;
}

let used_liquidity_msat = used_channel_liquidities
.get(&(hop.short_channel_id, source < target)).copied().unwrap_or(0);
let channel_usage = ChannelUsage {
amount_msat: final_value_msat + aggregate_next_hops_fee_msat,
inflight_htlc_msat: 0,
inflight_htlc_msat: used_liquidity_msat,
effective_capacity: candidate.effective_capacity(),
};
let channel_penalty_msat = scorer.channel_penalty_msat(
Expand Down

0 comments on commit 9e2da63

Please sign in to comment.