mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
pay: If the channel_hint matches our allocation allow it
It means we consume the channel completely to the best of our knowledge, so let that through. Changelog-Fixed: pay: Squeezed out the last `msat` from our local view of the network
This commit is contained in:
@@ -515,7 +515,7 @@ static bool payment_chanhints_apply_route(struct payment *p, bool remove)
|
|||||||
/* For all channels we check that they have a
|
/* For all channels we check that they have a
|
||||||
* sufficiently large estimated capacity to have some
|
* sufficiently large estimated capacity to have some
|
||||||
* chance of succeeding. */
|
* chance of succeeding. */
|
||||||
apply &= amount_msat_greater(curhint->estimated_capacity,
|
apply &= amount_msat_greater_eq(curhint->estimated_capacity,
|
||||||
curhop->amount);
|
curhop->amount);
|
||||||
|
|
||||||
if (!apply) {
|
if (!apply) {
|
||||||
@@ -530,6 +530,15 @@ static bool payment_chanhints_apply_route(struct payment *p, bool remove)
|
|||||||
type_to_string(tmpctx,
|
type_to_string(tmpctx,
|
||||||
struct short_channel_id_dir,
|
struct short_channel_id_dir,
|
||||||
&curhint->scid));
|
&curhint->scid));
|
||||||
|
paymod_log(
|
||||||
|
p, LOG_DBG,
|
||||||
|
"Capacity: estimated_capacity=%s, hop_amount=%s. "
|
||||||
|
"HTLC Budget: htlc_budget=%d, local=%d",
|
||||||
|
type_to_string(tmpctx, struct amount_msat,
|
||||||
|
&curhint->estimated_capacity),
|
||||||
|
type_to_string(tmpctx, struct amount_msat,
|
||||||
|
&curhop->amount),
|
||||||
|
curhint->htlc_budget, curhint->local);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user