config+rpcserver: allow configurable defualt-remote-max-htlcs

This commit is contained in:
Conner Fromknecht committed 2020-08-24 20:11:23 -07:00
1 parent 1760fe30db
commit 5c91be3f57
3 files changed
+37 -5

No files matched your search

+4
View File
@@ -1156,6 +1156,10 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
return lnwire.NewMSatFromSatoshis(chanAmt) - reserve
},
RequiredRemoteMaxHTLCs: func(chanAmt btcutil.Amount) uint16 {
if cfg.DefaultRemoteMaxHtlcs > 0 {
return cfg.DefaultRemoteMaxHtlcs
}
// By default, we'll permit them to utilize the full
// channel bandwidth.
return uint16(input.MaxHTLCNumber / 2)