From 5fbaed6b06322107afd706381a71adb97ab01a15 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Tue, 18 Apr 2023 11:46:48 +0200 Subject: [PATCH] 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. --- peer/brontide.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/peer/brontide.go b/peer/brontide.go index edc6c6b51..82b11e310 100644 --- a/peer/brontide.go +++ b/peer/brontide.go @@ -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{