lnd: pass through neutrino MaxPeers config

This enables users to set the config. We check that the currently set
value of MaxPeers is non-zero.
This commit is contained in:
bitromortac
2025-03-11 12:14:24 +01:00
parent c292acfe74
commit a93ec3b01a
4 changed files with 14 additions and 6 deletions

View File

@@ -248,6 +248,9 @@ const (
bitcoindBackendName = "bitcoind"
btcdBackendName = "btcd"
neutrinoBackendName = "neutrino"
defaultPrunedNodeMaxPeers = 4
defaultNeutrinoMaxPeers = 8
)
var (
@@ -285,8 +288,6 @@ var (
// estimatesmartfee RPC call.
defaultBitcoindEstimateMode = "CONSERVATIVE"
bitcoindEstimateModes = [2]string{"ECONOMICAL", defaultBitcoindEstimateMode}
defaultPrunedNodeMaxPeers = 4
)
// Config defines the configuration options for lnd.
@@ -599,6 +600,7 @@ func DefaultConfig() Config {
NeutrinoMode: &lncfg.Neutrino{
UserAgentName: neutrino.UserAgentName,
UserAgentVersion: neutrino.UserAgentVersion,
MaxPeers: defaultNeutrinoMaxPeers,
},
BlockCacheSize: defaultBlockCacheSize,
MaxPendingChannels: lncfg.DefaultMaxPendingChannels,