mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-10 14:17:56 +01:00
discovery: increase allowed max future message size
This commit adds a new const to increase the max future messages allowed from 100 to 1000, which is needed as during IBD a node with lots of channels might receive many future messages.
This commit is contained in:
@@ -47,6 +47,10 @@ const (
|
||||
// updates that we'll hold onto.
|
||||
maxPrematureUpdates = 100
|
||||
|
||||
// maxFutureMessages tracks the max amount of future messages that
|
||||
// we'll hold onto.
|
||||
maxFutureMessages = 1000
|
||||
|
||||
// DefaultSubBatchDelay is the default delay we'll use when
|
||||
// broadcasting the next announcement batch.
|
||||
DefaultSubBatchDelay = 5 * time.Second
|
||||
@@ -483,7 +487,7 @@ func New(cfg Config, selfKeyDesc *keychain.KeyDescriptor) *AuthenticatedGossiper
|
||||
cfg: &cfg,
|
||||
networkMsgs: make(chan *networkMsg),
|
||||
futureMsgs: lru.NewCache[uint32, *cachedNetworkMsg](
|
||||
maxPrematureUpdates,
|
||||
maxFutureMessages,
|
||||
),
|
||||
quit: make(chan struct{}),
|
||||
chanPolicyUpdates: make(chan *chanPolicyUpdateRequest),
|
||||
|
||||
Reference in New Issue
Block a user