peer: add TODO about initial forwarding policy

The right way to solve the problem of the link not being up to date with
custom user set forwarding policies once the channel is announced would
be to pass in those custom values when the link is created initially.
This requires a bit more of a refactor and is not addressed in this bug
fix.
This commit is contained in:
Oliver Gugger 2023-04-18 11:46:48 +02:00
parent 1eebbe3f42
commit 5fbaed6b06
No known key found for this signature in database
GPG Key ID: 8E4256593F177720

View File

@ -2437,6 +2437,11 @@ out:
// values, as they currently are always set to the default values
// at initial channel creation. Note that the maximum HTLC value
// defaults to the cap on the total value of outstanding HTLCs.
//
// TODO(guggero): We should instead pass in the current
// forwarding policy from the funding manager to avoid
// needing us to update the link once the channel is
// announced to the network with custom user values.
fwdMinHtlc := lnChan.FwdMinHtlc()
defaultPolicy := p.cfg.RoutingPolicy
forwardingPolicy := &htlcswitch.ForwardingPolicy{