Commit Graph

9 Commits

Author SHA1 Message Date
George Tsagkarelis
8e96d7000c routing: add htlcAmt to PaymentBandwidth method of TlvTrafficShaper 2024-09-18 19:07:16 +02:00
Oliver Gugger
374b659476 routing: don't assume HTLC amount for custom channel
It seems like the amount given to the getBandwidth is 0 in some cases
(keysend) and non-zero in other cases (invoice payment).
If we use custom channels, then that amount will likely not be the
actual HTLC amount we're going to put on chain. So we have to use a zero
amount for the MayAddOutgoingHtlc check, otherwise we might seem to go
below the local channel reserve even though we'll end up sending a very
small amount only.
And since the check here is just to find out we're not already at the
maximum HTLC capacity for this channel, we can safely use the amount of
0 for the check, which is handled properly in the link logic.
2024-07-11 12:00:20 +02:00
ffranr
29a12c28c9 routing: pass link bandwidth to traffic shaper's bandwidth query
This commit updates the traffic shaper's bandwidth query method to
accept the link bandwidth as a parameter. This allows an external
traffic shaper to optionally return the link bandwidth as the payment
bandwidth.
2024-06-20 22:28:58 +01:00
Oliver Gugger
b628483120 routing: update TLV traffic shaper interface 2024-05-27 20:23:01 +02:00
George Tsagkarelis
37cbfea912 routing: add TlvTrafficShaper to bandwidth hints 2024-05-22 17:28:22 +02:00
yyforyongyu
59578d9f1a routing: add more verbose logs 2023-01-17 07:26:57 +08:00
Oliver Gugger
895a2e497b multi: formatting and comment fixes 2022-02-10 11:02:02 +01:00
carla
990dda4b18 multi: thread bandwidth check amount down to MayAddOutgoingHtlc
Pass htlc amount down to the channel so that we don't need to rely
on minHtlc (and pad it when the channel sets a 0 min htlc). Update
test to just check some sane values since we're no longer relying
on minHtlc amount at all.
2021-10-19 09:50:51 +02:00
carla
45de686d35 multi: move bandwidth hints behind interface 2021-10-19 09:50:49 +02:00