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() }
// - established link
// - accept identification reply
//
// Dial does not update .NodeTab or its node entries in any way.
// For establishing links to peers present in .NodeTab use Node.Dial.
// Dial does not update NodeTab or its node entries in any way.
// 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) {
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
}
if accept.NodeType != typ {
// XXX send Error to peer?
return fmt.Errorf("accepted, but peer is not %v (identifies as %v)", typ, accept.NodeType)
// TODO send Error to peer?
return fmt.Errorf("accepted, but peer is not %s (identifies as %s)", typ, accept.NodeType)
}
return nil
......
......@@ -284,7 +284,7 @@ type dialed 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,
// 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