Skip to content

Commit 38862d3

Browse files
committed
server: remove shouldPeerBootstrap
We already set `nobootstrap` in the default node flags for itest nodes, so we can remove this check now. This will allow us to later test bootstrapping in an itest. NOTE that with this change, any signet/simnet/regtest network users will now need to explicitly add the `--nobootstrap` flag if they want to prevent automatic bootstrapping. This warning is added to the release notes later on.
1 parent 45c1564 commit 38862d3

File tree

2 files changed

+1
-97
lines changed

2 files changed

+1
-97
lines changed

server.go

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2644,7 +2644,7 @@ func (s *server) Start(ctx context.Context) error {
26442644
// configure the set of active bootstrappers, and launch a
26452645
// dedicated goroutine to maintain a set of persistent
26462646
// connections.
2647-
if shouldPeerBootstrap(s.cfg) {
2647+
if !s.cfg.NoNetBootstrap {
26482648
bootstrappers, err := initNetworkBootstrappers(s)
26492649
if err != nil {
26502650
startErr = err
@@ -5378,20 +5378,6 @@ func newSweepPkScriptGen(
53785378
}
53795379
}
53805380

5381-
// shouldPeerBootstrap returns true if we should attempt to perform peer
5382-
// bootstrapping to actively seek our peers using the set of active network
5383-
// bootstrappers.
5384-
func shouldPeerBootstrap(cfg *Config) bool {
5385-
isSimnet := cfg.Bitcoin.SimNet
5386-
isSignet := cfg.Bitcoin.SigNet
5387-
isRegtest := cfg.Bitcoin.RegTest
5388-
isDevNetwork := isSimnet || isSignet || isRegtest
5389-
5390-
// TODO(yy): remove the check on simnet/regtest such that the itest is
5391-
// covering the bootstrapping process.
5392-
return !cfg.NoNetBootstrap && !isDevNetwork
5393-
}
5394-
53955381
// fetchClosedChannelSCIDs returns a set of SCIDs that have their force closing
53965382
// finished.
53975383
func (s *server) fetchClosedChannelSCIDs() map[lnwire.ShortChannelID]struct{} {

server_test.go

Lines changed: 0 additions & 82 deletions
This file was deleted.

0 commit comments

Comments
 (0)