mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-10 22:27:22 +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.
|
// updates that we'll hold onto.
|
||||||
maxPrematureUpdates = 100
|
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
|
// DefaultSubBatchDelay is the default delay we'll use when
|
||||||
// broadcasting the next announcement batch.
|
// broadcasting the next announcement batch.
|
||||||
DefaultSubBatchDelay = 5 * time.Second
|
DefaultSubBatchDelay = 5 * time.Second
|
||||||
@@ -483,7 +487,7 @@ func New(cfg Config, selfKeyDesc *keychain.KeyDescriptor) *AuthenticatedGossiper
|
|||||||
cfg: &cfg,
|
cfg: &cfg,
|
||||||
networkMsgs: make(chan *networkMsg),
|
networkMsgs: make(chan *networkMsg),
|
||||||
futureMsgs: lru.NewCache[uint32, *cachedNetworkMsg](
|
futureMsgs: lru.NewCache[uint32, *cachedNetworkMsg](
|
||||||
maxPrematureUpdates,
|
maxFutureMessages,
|
||||||
),
|
),
|
||||||
quit: make(chan struct{}),
|
quit: make(chan struct{}),
|
||||||
chanPolicyUpdates: make(chan *chanPolicyUpdateRequest),
|
chanPolicyUpdates: make(chan *chanPolicyUpdateRequest),
|
||||||
|
|||||||
Reference in New Issue
Block a user