aboutsummaryrefslogtreecommitdiffstats
path: root/ethereum.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-11-14 01:12:12 +0800
committerobscuren <geffobscura@gmail.com>2014-11-14 01:12:12 +0800
commit20d518ee959f1621a5accf1f3432282a6c0d6c3c (patch)
treec1c9dcd1e2ced349d11edeca7d2ef179b092fc9b /ethereum.go
parent60cdb1148c404218846fd39331690658168f4e04 (diff)
downloaddexon-20d518ee959f1621a5accf1f3432282a6c0d6c3c.tar
dexon-20d518ee959f1621a5accf1f3432282a6c0d6c3c.tar.gz
dexon-20d518ee959f1621a5accf1f3432282a6c0d6c3c.tar.bz2
dexon-20d518ee959f1621a5accf1f3432282a6c0d6c3c.tar.lz
dexon-20d518ee959f1621a5accf1f3432282a6c0d6c3c.tar.xz
dexon-20d518ee959f1621a5accf1f3432282a6c0d6c3c.tar.zst
dexon-20d518ee959f1621a5accf1f3432282a6c0d6c3c.zip
Numerous fixes for consensus.
* Removed (buged) C++ specific gas specification for LOG* * Fixed LOG* where mstart went after msize *
Diffstat (limited to 'ethereum.go')
-rw-r--r--ethereum.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/ethereum.go b/ethereum.go
index a919c3191..ce8a92b58 100644
--- a/ethereum.go
+++ b/ethereum.go
@@ -233,7 +233,7 @@ func (s *Ethereum) ConnectToPeer(addr string) error {
if s.peers.Len() < s.MaxPeers {
var alreadyConnected bool
- ahost, _, _ := net.SplitHostPort(addr)
+ ahost, aport, _ := net.SplitHostPort(addr)
var chost string
ips, err := net.LookupIP(ahost)
@@ -273,9 +273,9 @@ func (s *Ethereum) ConnectToPeer(addr string) error {
if p.conn == nil {
return
}
- phost, _, _ := net.SplitHostPort(p.conn.RemoteAddr().String())
+ phost, pport, _ := net.SplitHostPort(p.conn.RemoteAddr().String())
- if phost == chost {
+ if phost == chost && pport == aport {
alreadyConnected = true
//loggerger.Debugf("Peer %s already added.\n", chost)
return