lncfg: add new PrunedNodeMaxPeers config option/flag
This commit is contained in:
parent
82fe5d9bba
commit
56c536583f
@ -397,6 +397,7 @@ func NewChainControl(cfg *Config) (*ChainControl, error) {
|
|||||||
ZMQTxHost: bitcoindMode.ZMQPubRawTx,
|
ZMQTxHost: bitcoindMode.ZMQPubRawTx,
|
||||||
ZMQReadDeadline: 5 * time.Second,
|
ZMQReadDeadline: 5 * time.Second,
|
||||||
Dialer: cfg.Dialer,
|
Dialer: cfg.Dialer,
|
||||||
|
PrunedModeMaxPeers: bitcoindMode.PrunedNodeMaxPeers,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -183,6 +183,8 @@ var (
|
|||||||
defaultBitcoindEstimateMode = "CONSERVATIVE"
|
defaultBitcoindEstimateMode = "CONSERVATIVE"
|
||||||
bitcoindEstimateModes = [2]string{"ECONOMICAL", defaultBitcoindEstimateMode}
|
bitcoindEstimateModes = [2]string{"ECONOMICAL", defaultBitcoindEstimateMode}
|
||||||
|
|
||||||
|
defaultPrunedNodeMaxPeers = 4
|
||||||
|
|
||||||
defaultSphinxDbName = "sphinxreplay.db"
|
defaultSphinxDbName = "sphinxreplay.db"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -395,6 +397,7 @@ func DefaultConfig() Config {
|
|||||||
Dir: defaultBitcoindDir,
|
Dir: defaultBitcoindDir,
|
||||||
RPCHost: defaultRPCHost,
|
RPCHost: defaultRPCHost,
|
||||||
EstimateMode: defaultBitcoindEstimateMode,
|
EstimateMode: defaultBitcoindEstimateMode,
|
||||||
|
PrunedNodeMaxPeers: defaultPrunedNodeMaxPeers,
|
||||||
},
|
},
|
||||||
Litecoin: &lncfg.Chain{
|
Litecoin: &lncfg.Chain{
|
||||||
MinHTLCIn: chainreg.DefaultLitecoinMinHTLCInMSat,
|
MinHTLCIn: chainreg.DefaultLitecoinMinHTLCInMSat,
|
||||||
@ -414,6 +417,7 @@ func DefaultConfig() Config {
|
|||||||
Dir: defaultLitecoindDir,
|
Dir: defaultLitecoindDir,
|
||||||
RPCHost: defaultRPCHost,
|
RPCHost: defaultRPCHost,
|
||||||
EstimateMode: defaultBitcoindEstimateMode,
|
EstimateMode: defaultBitcoindEstimateMode,
|
||||||
|
PrunedNodeMaxPeers: defaultPrunedNodeMaxPeers,
|
||||||
},
|
},
|
||||||
NeutrinoMode: &lncfg.Neutrino{
|
NeutrinoMode: &lncfg.Neutrino{
|
||||||
UserAgentName: neutrino.UserAgentName,
|
UserAgentName: neutrino.UserAgentName,
|
||||||
|
@ -10,4 +10,5 @@ type Bitcoind struct {
|
|||||||
ZMQPubRawBlock string `long:"zmqpubrawblock" description:"The address listening for ZMQ connections to deliver raw block notifications"`
|
ZMQPubRawBlock string `long:"zmqpubrawblock" description:"The address listening for ZMQ connections to deliver raw block notifications"`
|
||||||
ZMQPubRawTx string `long:"zmqpubrawtx" description:"The address listening for ZMQ connections to deliver raw transaction notifications"`
|
ZMQPubRawTx string `long:"zmqpubrawtx" description:"The address listening for ZMQ connections to deliver raw transaction notifications"`
|
||||||
EstimateMode string `long:"estimatemode" description:"The fee estimate mode. Must be either ECONOMICAL or CONSERVATIVE."`
|
EstimateMode string `long:"estimatemode" description:"The fee estimate mode. Must be either ECONOMICAL or CONSERVATIVE."`
|
||||||
|
PrunedNodeMaxPeers int `long:"pruned-node-max-peers" description:"The maximum number of peers lnd will choose from the backend node to retrieve pruned blocks from. This only applies to pruned nodes."`
|
||||||
}
|
}
|
||||||
|
@ -536,6 +536,10 @@ bitcoin.node=btcd
|
|||||||
; If unset, the default value is "CONSERVATIVE".
|
; If unset, the default value is "CONSERVATIVE".
|
||||||
; bitcoind.estimatemode=CONSERVATIVE
|
; bitcoind.estimatemode=CONSERVATIVE
|
||||||
|
|
||||||
|
; The maximum number of peers lnd will choose from the backend node to retrieve
|
||||||
|
; pruned blocks from. This only applies to pruned nodes.
|
||||||
|
; bitcoind.pruned-node-max-peers=4
|
||||||
|
|
||||||
[neutrino]
|
[neutrino]
|
||||||
|
|
||||||
; Connect only to the specified peers at startup. This creates a persistent
|
; Connect only to the specified peers at startup. This creates a persistent
|
||||||
@ -706,6 +710,10 @@ litecoin.node=ltcd
|
|||||||
; If unset, the default value is "CONSERVATIVE".
|
; If unset, the default value is "CONSERVATIVE".
|
||||||
; litecoind.estimatemode=CONSERVATIVE
|
; litecoind.estimatemode=CONSERVATIVE
|
||||||
|
|
||||||
|
; The maximum number of peers lnd will choose from the backend node to retrieve
|
||||||
|
; pruned blocks from. This only applies to pruned nodes.
|
||||||
|
; litecoind.pruned-node-max-peers=4
|
||||||
|
|
||||||
[autopilot]
|
[autopilot]
|
||||||
|
|
||||||
; If the autopilot agent should be active or not. The autopilot agent will
|
; If the autopilot agent should be active or not. The autopilot agent will
|
||||||
|
Loading…
Reference in New Issue
Block a user