multi: introduce config-level DustThreshold for defining threshold

This commit is contained in:
eugene committed 2021-09-30 13:44:35 -04:00
1 parent 3897baff0a
commit 702b3a3258
6 files changed
+23 -5

No files matched your search

+4
View File
@@ -490,6 +490,9 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
s.htlcNotifier = htlcswitch.NewHtlcNotifier(time.Now)
thresholdSats := btcutil.Amount(cfg.DustThreshold)
thresholdMSats := lnwire.NewMSatFromSatoshis(thresholdSats)
s.htlcSwitch, err = htlcswitch.New(htlcswitch.Config{
DB: dbs.chanStateDB,
LocalChannelClose: func(pubKey []byte,
@@ -519,6 +522,7 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
RejectHTLC: cfg.RejectHTLC,
Clock: clock.NewDefaultClock(),
HTLCExpiry: htlcswitch.DefaultHTLCExpiry,
DustThreshold: thresholdMSats,
}, uint32(currentHeight))
if err != nil {
return nil, err