funding: ensure the chan policy max htlc size is below max pay size

This commit is contained in:
Olaoluwa Osuntokun 2019-12-04 15:01:58 -08:00
parent c943d85019
commit 9b3385e87d
No known key found for this signature in database
GPG Key ID: BC13F65E2DC84465

@ -2359,6 +2359,9 @@ func (f *fundingManager) annAfterSixConfs(completeChan *channeldb.OpenChannel,
if fwdMaxHTLC > capacityMSat {
fwdMaxHTLC = capacityMSat
}
if fwdMaxHTLC > MaxPaymentMSat {
fwdMaxHTLC = MaxPaymentMSat
}
// Create and broadcast the proofs required to make this channel
// public and usable for other nodes for routing.