-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Conversation
License: MIT Signed-off-by: Kejie Zhang <[email protected]>
Hi @lgierth @Stebalien , I have added a warning when no bootsrap in config , aimed to solving issue #4576 . Please help me review it , if you have any advice or anything needed to update,please ping me.Thx a lot. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I'd elaborate on the message a bit but yes, we should be doing this.
Note: Warnings aren't currently displayed by default but we'd like to change that. We may want to change this to an Error
for now.
core/bootstrap.go
Outdated
@@ -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") |
There was a problem hiding this comment.
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.
License: MIT Signed-off-by: Kejie Zhang <[email protected]>
@Stebalien Thx a lot for your suggestion,and i have updated my pr.Can u help me review again? |
feature #4576
License: MIT
Signed-off-by: Kejie Zhang [email protected]