lncfg: expose channel update rate limiting options
This commit is contained in:
parent
b4aa661d16
commit
dcac5a87f4
@ -488,7 +488,10 @@ func DefaultConfig() Config {
|
|||||||
Backoff: defaultTLSBackoff,
|
Backoff: defaultTLSBackoff,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Gossip: &lncfg.Gossip{},
|
Gossip: &lncfg.Gossip{
|
||||||
|
MaxChannelUpdateBurst: discovery.DefaultMaxChannelUpdateBurst,
|
||||||
|
ChannelUpdateInterval: discovery.DefaultChannelUpdateInterval,
|
||||||
|
},
|
||||||
MaxOutgoingCltvExpiry: htlcswitch.DefaultMaxOutgoingCltvExpiry,
|
MaxOutgoingCltvExpiry: htlcswitch.DefaultMaxOutgoingCltvExpiry,
|
||||||
MaxChannelFeeAllocation: htlcswitch.DefaultMaxLinkFeeAllocation,
|
MaxChannelFeeAllocation: htlcswitch.DefaultMaxLinkFeeAllocation,
|
||||||
MaxCommitFeeRateAnchors: lnwallet.DefaultAnchorsCommitMaxFeeRateSatPerVByte,
|
MaxCommitFeeRateAnchors: lnwallet.DefaultAnchorsCommitMaxFeeRateSatPerVByte,
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package lncfg
|
package lncfg
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/lightningnetwork/lnd/discovery"
|
"github.com/lightningnetwork/lnd/discovery"
|
||||||
"github.com/lightningnetwork/lnd/routing/route"
|
"github.com/lightningnetwork/lnd/routing/route"
|
||||||
)
|
)
|
||||||
@ -9,6 +11,10 @@ type Gossip struct {
|
|||||||
PinnedSyncersRaw []string `long:"pinned-syncers" description:"A set of peers that should always remain in an active sync state, which can be used to closely synchronize the routing tables of two nodes. The value should be comma separated list of hex-encoded pubkeys. Connected peers matching this pubkey will remain active for the duration of the connection and not count towards the NumActiveSyncer count."`
|
PinnedSyncersRaw []string `long:"pinned-syncers" description:"A set of peers that should always remain in an active sync state, which can be used to closely synchronize the routing tables of two nodes. The value should be comma separated list of hex-encoded pubkeys. Connected peers matching this pubkey will remain active for the duration of the connection and not count towards the NumActiveSyncer count."`
|
||||||
|
|
||||||
PinnedSyncers discovery.PinnedSyncers
|
PinnedSyncers discovery.PinnedSyncers
|
||||||
|
|
||||||
|
MaxChannelUpdateBurst int `long:"max-channel-update-burst" description:"The maximum number of updates for a specific channel and direction that lnd will accept over the channel update interval."`
|
||||||
|
|
||||||
|
ChannelUpdateInterval time.Duration `long:"channel-update-interval" description:"The interval used to determine how often lnd should allow a burst of new updates for a specific channel and direction."`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse the pubkeys for the pinned syncers.
|
// Parse the pubkeys for the pinned syncers.
|
||||||
|
@ -1043,3 +1043,8 @@ litecoin.node=ltcd
|
|||||||
; peers can be specified by setting multiple flags/fields in the config.
|
; peers can be specified by setting multiple flags/fields in the config.
|
||||||
; gossip.pinned-syncers=pubkey1
|
; gossip.pinned-syncers=pubkey1
|
||||||
; gossip.pinned-syncers=pubkey2
|
; gossip.pinned-syncers=pubkey2
|
||||||
|
|
||||||
|
; The maximum number of updates for a specific channel and direction that lnd
|
||||||
|
; will accept over the channel update interval.
|
||||||
|
; gossip.max-channel-update-burst=10
|
||||||
|
; gossip.channel-update-interval=1m
|
||||||
|
@ -823,6 +823,8 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
|
|||||||
SubBatchDelay: time.Second * 5,
|
SubBatchDelay: time.Second * 5,
|
||||||
IgnoreHistoricalFilters: cfg.IgnoreHistoricalGossipFilters,
|
IgnoreHistoricalFilters: cfg.IgnoreHistoricalGossipFilters,
|
||||||
PinnedSyncers: cfg.Gossip.PinnedSyncers,
|
PinnedSyncers: cfg.Gossip.PinnedSyncers,
|
||||||
|
MaxChannelUpdateBurst: cfg.Gossip.MaxChannelUpdateBurst,
|
||||||
|
ChannelUpdateInterval: cfg.Gossip.ChannelUpdateInterval,
|
||||||
},
|
},
|
||||||
nodeKeyECDH.PubKey(),
|
nodeKeyECDH.PubKey(),
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user