Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add warning when no bootstrap in config #5445

Merged
merged 2 commits into from
Sep 11, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion core/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ func bootstrapRound(ctx context.Context, host host.Host, cfg BootstrapConfig) er
// get bootstrap peers from config. retrieving them here makes
// sure we remain observant of changes to client configuration.
peers := cfg.BootstrapPeers()

if len(peers) == 0 {
log.Warning("no bootstrap in the configuration file")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say something like:

no bootstrap nodes configured: go-ipfs may have difficulty connecting to the network

Technically, IPFS can still work if there are other IPFS nodes on the local network but this is still a good warning to have.

}
// determine how many bootstrap connections to open
connected := host.Network().Peers()
if len(connected) >= cfg.MinPeerThreshold {
Expand Down