提交 0a8e5b99 作者: Brian Tiger Chow

log(routing) report boostrap result to user

上级 a7cea2ea
......@@ -34,10 +34,17 @@ func Standard(h host.Host, remotes []peer.PeerInfo) Proxy {
}
func (px *standard) Bootstrap(ctx context.Context) error {
var cxns []peer.PeerInfo
for _, info := range px.Remotes {
if err := px.Host.Connect(ctx, info); err != nil {
return err // TODO
continue
}
cxns = append(cxns, info)
}
if len(cxns) == 0 {
log.Critical("unable to bootstrap to any supernode routers")
} else {
log.Info("bootstrapped to %d supernode routers: %s", len(cxns), cxns)
}
return nil
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论