lnd: expose user agent name as config option
Expose the neutrino `UserAgentName` config option. This can be set by starting lnd with the `--neutrino.useragentname=` flag.
This commit is contained in:
parent
be36776120
commit
4394cc39af
@ -785,6 +785,7 @@ func initNeutrinoBackend(cfg *Config, chainDir string) (*neutrino.ChainService,
|
|||||||
|
|
||||||
neutrino.MaxPeers = 8
|
neutrino.MaxPeers = 8
|
||||||
neutrino.BanDuration = time.Hour * 48
|
neutrino.BanDuration = time.Hour * 48
|
||||||
|
neutrino.UserAgentName = cfg.NeutrinoMode.UserAgentName
|
||||||
|
|
||||||
neutrinoCS, err := neutrino.NewChainService(config)
|
neutrinoCS, err := neutrino.NewChainService(config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -197,6 +197,7 @@ neutrino:
|
|||||||
--neutrino.maxpeers= Max number of inbound and outbound peers
|
--neutrino.maxpeers= Max number of inbound and outbound peers
|
||||||
--neutrino.banduration= How long to ban misbehaving peers. Valid time units are {s, m, h}. Minimum 1 second
|
--neutrino.banduration= How long to ban misbehaving peers. Valid time units are {s, m, h}. Minimum 1 second
|
||||||
--neutrino.banthreshold= Maximum allowed ban score before disconnecting and banning misbehaving peers.
|
--neutrino.banthreshold= Maximum allowed ban score before disconnecting and banning misbehaving peers.
|
||||||
|
--neutrino.useragentname= Used to help identify ourselves to other bitcoin peers.
|
||||||
```
|
```
|
||||||
|
|
||||||
## Bitcoind Options
|
## Bitcoind Options
|
||||||
|
@ -12,4 +12,5 @@ type Neutrino struct {
|
|||||||
BanThreshold uint32 `long:"banthreshold" description:"Maximum allowed ban score before disconnecting and banning misbehaving peers."`
|
BanThreshold uint32 `long:"banthreshold" description:"Maximum allowed ban score before disconnecting and banning misbehaving peers."`
|
||||||
FeeURL string `long:"feeurl" description:"Optional URL for fee estimation. If a URL is not specified, static fees will be used for estimation."`
|
FeeURL string `long:"feeurl" description:"Optional URL for fee estimation. If a URL is not specified, static fees will be used for estimation."`
|
||||||
AssertFilterHeader string `long:"assertfilterheader" description:"Optional filter header in height:hash format to assert the state of neutrino's filter header chain on startup. If the assertion does not hold, then the filter header chain will be re-synced from the genesis block."`
|
AssertFilterHeader string `long:"assertfilterheader" description:"Optional filter header in height:hash format to assert the state of neutrino's filter header chain on startup. If the assertion does not hold, then the filter header chain will be re-synced from the genesis block."`
|
||||||
|
UserAgentName string `long:"useragentname" description:"Used to help identify ourselves to other bitcoin peers"`
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user