server: disable network bootstrapping for regtest

This commit is contained in:
Olaoluwa Osuntokun 2017-11-30 22:07:01 -08:00
parent c0b8c29382
commit 87840f215b
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21
2 changed files with 4 additions and 1 deletions

2
.gitignore vendored
View File

@ -45,3 +45,5 @@ profile.cov
profile.tmp
.DS_Store
main*

View File

@ -419,7 +419,8 @@ func (s *server) Start() error {
// If network bootstrapping hasn't been disabled, then we'll configure
// the set of active bootstrappers, and launch a dedicated goroutine to
// maintain a set of persistent connections.
if !cfg.NoNetBootstrap && !(cfg.Bitcoin.SimNet || cfg.Litecoin.SimNet) {
if !cfg.NoNetBootstrap && !(cfg.Bitcoin.SimNet || cfg.Litecoin.SimNet) &&
!(cfg.Bitcoin.RegTest || cfg.Litecoin.RegTest) {
networkBootStrappers, err := initNetworkBootstrappers(s)
if err != nil {
return err