diff options
author | obscuren <geffobscura@gmail.com> | 2014-11-14 01:12:12 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-11-14 01:12:12 +0800 |
commit | 20d518ee959f1621a5accf1f3432282a6c0d6c3c (patch) | |
tree | c1c9dcd1e2ced349d11edeca7d2ef179b092fc9b /ethereum.go | |
parent | 60cdb1148c404218846fd39331690658168f4e04 (diff) | |
download | dexon-20d518ee959f1621a5accf1f3432282a6c0d6c3c.tar.gz 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.go | 6 |
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 |