cmd/mist, eth, javascript, p2p: use Node URLs for peer suggestions
This commit is contained in:
@ -135,8 +135,8 @@ func (srv *Server) PeerCount() int {
|
||||
|
||||
// SuggestPeer creates a connection to the given Node if it
|
||||
// is not already connected.
|
||||
func (srv *Server) SuggestPeer(ip net.IP, port int, id discover.NodeID) {
|
||||
srv.peerConnect <- &discover.Node{ID: id, IP: ip, TCPPort: port}
|
||||
func (srv *Server) SuggestPeer(n *discover.Node) {
|
||||
srv.peerConnect <- n
|
||||
}
|
||||
|
||||
// Broadcast sends an RLP-encoded message to all connected peers.
|
||||
|
@ -91,7 +91,7 @@ func TestServerDial(t *testing.T) {
|
||||
|
||||
// tell the server to connect
|
||||
tcpAddr := listener.Addr().(*net.TCPAddr)
|
||||
srv.peerConnect <- &discover.Node{IP: tcpAddr.IP, TCPPort: tcpAddr.Port}
|
||||
srv.SuggestPeer(&discover.Node{IP: tcpAddr.IP, TCPPort: tcpAddr.Port})
|
||||
|
||||
select {
|
||||
case conn := <-accepted:
|
||||
|
Reference in New Issue
Block a user