test+config: add new --nobootstrap option to disable connection bootstrapping
This commit adds a new config option to allow callers to optionally disable connection bootstrapping. This may be desirable for several reasons, but primary, we add this so we can keep our integration tests under the same context as before bootstrapping existed.
This commit is contained in:
2 files changed
+4
No files matched your search
@@ -123,6 +123,8 @@ type config struct {
|
||||
NeutrinoMode *neutrinoConfig `group:"neutrino" namespace:"neutrino"`
|
||||
|
||||
Autopilot *autoPilotConfig `group:"autopilot" namespace:"autopilot"`
|
||||
|
||||
NoNetBootstrap bool `long:"nobootstrap" description:"If true, then automatic network bootstrapping will not be attempted."`
|
||||
}
|
||||
|
||||
// loadConfig initializes and parses the config using a config file and command
|
||||
@@ -272,6 +274,7 @@ func loadConfig() (*config, error) {
|
||||
activeNetParams = regTestNetParams
|
||||
}
|
||||
if cfg.Bitcoin.SimNet {
|
||||
numNets++
|
||||
activeNetParams = bitcoinSimNetParams
|
||||
}
|
||||
if numNets > 1 {
|
||||
|
||||
@@ -171,6 +171,7 @@ func (l *lightningNode) genArgs() []string {
|
||||
encodedCert := hex.EncodeToString(l.rpcCert)
|
||||
args = append(args, "--bitcoin.active")
|
||||
args = append(args, "--bitcoin.simnet")
|
||||
args = append(args, "--nobootstrap")
|
||||
args = append(args, fmt.Sprintf("--bitcoin.rpchost=%v", l.cfg.Bitcoin.RPCHost))
|
||||
args = append(args, fmt.Sprintf("--bitcoin.rpcuser=%v", l.cfg.Bitcoin.RPCUser))
|
||||
args = append(args, fmt.Sprintf("--bitcoin.rpcpass=%v", l.cfg.Bitcoin.RPCPass))
|
||||
|
||||
Reference in new issue
Block a user