Browse Source

lncfg: add config options for new neutrino options

master
Wilmer Paulino 3 years ago
parent
commit
2084cb0ad5
No known key found for this signature in database
GPG Key ID: 6DF57B9F9514972F
  1. 2
      lncfg/neutrino.go
  2. 2
      lnd.go
  3. 6
      sample-lnd.conf

2
lncfg/neutrino.go

@ -15,4 +15,6 @@ type Neutrino struct {
UserAgentName string `long:"useragentname" description:"Used to help identify ourselves to other bitcoin peers"`
UserAgentVersion string `long:"useragentversion" description:"Used to help identify ourselves to other bitcoin peers"`
ValidateChannels bool `long:"validatechannels" description:"Validate every channel in the graph during sync by downloading the containing block. This is the inverse of routing.assumechanvalid, meaning that for Neutrino the validation is turned off by default for massively increased graph sync performance. This speedup comes at the risk of using an unvalidated view of the network for routing. Overwrites the value of routing.assumechanvalid if Neutrino is used. (default: false)"`
BroadcastTimeout time.Duration `long:"broadcasttimeout" description:"The amount of time to wait before giving up on a transaction broadcast attempt."`
PersistFilters bool `long:"persistfilters" description:"Whether compact filters fetched from the P2P network should be persisted to disk."`
}

2
lnd.go

@ -1670,6 +1670,8 @@ func initNeutrinoBackend(cfg *Config, chainDir string,
},
AssertFilterHeader: headerStateAssertion,
BlockCache: blockCache.Cache,
BroadcastTimeout: cfg.NeutrinoMode.BroadcastTimeout,
PersistToDisk: cfg.NeutrinoMode.PersistFilters,
}
neutrino.MaxPeers = 8

6
sample-lnd.conf

@ -482,6 +482,12 @@ bitcoin.node=btcd
; Used to help identify ourselves to other bitcoin peers (default: 0.11.0-beta).
; neutrino.useragentversion=0.11.0-beta
; The amount of time to wait before giving up on a transaction broadcast attempt.
; neutrino.broadcasttimeout=5s
; Whether compact filters fetched from the P2P network should be persisted to disk.
; neutrino.persistfilters=true
; Validate every channel in the graph during sync by downloading the containing
; block. This is the inverse of routing.assumechanvalid, meaning that for
; Neutrino the validation is turned off by default for massively increased graph

Loading…
Cancel
Save