addnode fail to add should log not error (#446)

This commit is contained in:
Dennis Coyle 2018-10-10 11:05:05 -04:00 committed by GitHub
parent 4a51db2344
commit 0d28101085
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,6 +12,7 @@ import (
"path/filepath"
"github.com/zeebo/errs"
"go.uber.org/zap"
"google.golang.org/grpc"
"storj.io/storj/pkg/dht"
@ -69,9 +70,12 @@ func NewKademlia(id dht.NodeID, bootstrapNodes []pb.Node, address string, identi
for _, v := range bootstrapNodes {
ok, err := rt.addNode(&v)
if !ok || err != nil {
if err != nil {
return nil, err
}
if !ok {
zap.L().Warn("Failed to add node", zap.String("NodeID", v.Id))
}
}
k := &Kademlia{