Commit ddadb8b1 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent e92f891a
...@@ -109,8 +109,8 @@ func (l *listener) Addr() net.Addr { return l.l.Addr() } ...@@ -109,8 +109,8 @@ func (l *listener) Addr() net.Addr { return l.l.Addr() }
// - established link // - established link
// - accept identification reply // - accept identification reply
// //
// Dial does not update .NodeTab or its node entries in any way. // Dial does not update NodeTab or its node entries in any way.
// For establishing links to peers present in .NodeTab use Node.Dial. // For establishing links to peers present in NodeTab use PeerNode.Dial.
func Dial(ctx context.Context, typ proto.NodeType, net xnet.Networker, addr string, reqID *proto.RequestIdentification) (_ *neonet.NodeLink, _ *proto.AcceptIdentification, err error) { func Dial(ctx context.Context, typ proto.NodeType, net xnet.Networker, addr string, reqID *proto.RequestIdentification) (_ *neonet.NodeLink, _ *proto.AcceptIdentification, err error) {
defer task.Runningf(&ctx, "dial %s (%s)", addr, typ)(&err) defer task.Runningf(&ctx, "dial %s (%s)", addr, typ)(&err)
...@@ -141,8 +141,8 @@ func Dial(ctx context.Context, typ proto.NodeType, net xnet.Networker, addr stri ...@@ -141,8 +141,8 @@ func Dial(ctx context.Context, typ proto.NodeType, net xnet.Networker, addr stri
} }
if accept.NodeType != typ { if accept.NodeType != typ {
// XXX send Error to peer? // TODO send Error to peer?
return fmt.Errorf("accepted, but peer is not %v (identifies as %v)", typ, accept.NodeType) return fmt.Errorf("accepted, but peer is not %s (identifies as %s)", typ, accept.NodeType)
} }
return nil return nil
......
...@@ -284,7 +284,7 @@ type dialed struct { ...@@ -284,7 +284,7 @@ type dialed struct {
ready chan struct{} ready chan struct{}
} }
// Dial establishes link to peer node. // Dial establishes link to the peer node.
// //
// If the link was not yet established Dial dials the peer appropriately, // If the link was not yet established Dial dials the peer appropriately,
// handshakes, requests identification and checks that identification reply is // handshakes, requests identification and checks that identification reply is
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment