From 55ff1131de32aea9f6c6efb737e6416ae97c7c40 Mon Sep 17 00:00:00 2001 From: Joost Jager Date: Fri, 15 Nov 2019 10:36:10 +0100 Subject: [PATCH] fundingmanager: check remote min htlc against our defaults --- fundingmanager.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fundingmanager.go b/fundingmanager.go index 77b3f24f5..b11bf9387 100644 --- a/fundingmanager.go +++ b/fundingmanager.go @@ -2209,6 +2209,12 @@ func (f *fundingManager) addToRouterGraph(completeChan *channeldb.OpenChannel, // need to determine the smallest HTLC it deems economically relevant. fwdMinHTLC := completeChan.LocalChanCfg.MinHTLC + // We don't necessarily want to go as low as the remote party + // allows. Check it against our default forwarding policy. + if fwdMinHTLC < f.cfg.DefaultRoutingPolicy.MinHTLCOut { + fwdMinHTLC = f.cfg.DefaultRoutingPolicy.MinHTLCOut + } + // We'll obtain the max HTLC value we can forward in our direction, as // we'll use this value within our ChannelUpdate. This value must be <= // channel capacity and <= the maximum in-flight msats set by the peer.