mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-02 03:54:26 +02:00
server: disable DNS boostrap for SigNet nodes
In this commit, we fix a bug that would cause nodes attempting to run using the signet chain, to waste CPU as they attempted to boostrap to a non-existent DNS seed. We fix this by ignoring the DNS boostrapper is signet is active. Along the way, we refactor the conditional sightly to be more readable, and easily extensible.
This commit is contained in:
@@ -1788,10 +1788,11 @@ func (s *server) Start() error {
|
||||
// configure the set of active bootstrappers, and launch a
|
||||
// dedicated goroutine to maintain a set of persistent
|
||||
// connections.
|
||||
if !s.cfg.NoNetBootstrap &&
|
||||
!(s.cfg.Bitcoin.SimNet || s.cfg.Litecoin.SimNet) &&
|
||||
!(s.cfg.Bitcoin.RegTest || s.cfg.Litecoin.RegTest) {
|
||||
|
||||
isSimnet := (s.cfg.Bitcoin.SimNet || s.cfg.Litecoin.SimNet)
|
||||
isSignet := (s.cfg.Bitcoin.SigNet || s.cfg.Litecoin.SigNet)
|
||||
isRegtest := (s.cfg.Bitcoin.RegTest || s.cfg.Litecoin.RegTest)
|
||||
isDevNetwork := isSimnet || isSignet || isRegtest
|
||||
if !s.cfg.NoNetBootstrap && !isDevNetwork {
|
||||
bootstrappers, err := initNetworkBootstrappers(s)
|
||||
if err != nil {
|
||||
startErr = err
|
||||
|
Reference in New Issue
Block a user