Self connect
This commit is contained in:
parent
da66eddfcc
commit
8c09602a8b
@ -187,15 +187,6 @@ func (s *Ethereum) Start() {
|
|||||||
// This is mainly for testing to create a "network"
|
// This is mainly for testing to create a "network"
|
||||||
if ethutil.Config.Debug {
|
if ethutil.Config.Debug {
|
||||||
log.Println("Connection listening disabled. Acting as client")
|
log.Println("Connection listening disabled. Acting as client")
|
||||||
|
|
||||||
/*
|
|
||||||
err = s.ConnectToPeer("localhost:12345")
|
|
||||||
if err != nil {
|
|
||||||
log.Println("Error starting ethereum", err)
|
|
||||||
|
|
||||||
s.Stop()
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
} else {
|
} else {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
1
peer.go
1
peer.go
@ -282,7 +282,6 @@ func (p *Peer) Start(seed bool) {
|
|||||||
|
|
||||||
peerHost, _, _ := net.SplitHostPort(p.conn.LocalAddr().String())
|
peerHost, _, _ := net.SplitHostPort(p.conn.LocalAddr().String())
|
||||||
servHost, _, _ := net.SplitHostPort(p.conn.RemoteAddr().String())
|
servHost, _, _ := net.SplitHostPort(p.conn.RemoteAddr().String())
|
||||||
log.Println(peerHost, servHost)
|
|
||||||
if peerHost == servHost {
|
if peerHost == servHost {
|
||||||
log.Println("Connected to self")
|
log.Println("Connected to self")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user