From 4a82230de58077b2f947dced27cce0e2abb6272e Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 27 Jan 2014 22:13:46 +0100 Subject: [PATCH] Switched port and removed logging --- ethereum.go | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/ethereum.go b/ethereum.go index ac11903c0..5eaf31d12 100644 --- a/ethereum.go +++ b/ethereum.go @@ -133,8 +133,6 @@ func (s *Ethereum) ReapDeadPeers() { for { eachPeer(s.peers, func(p *Peer, e *list.Element) { if atomic.LoadInt32(&p.disconnect) == 1 || (p.inbound && (time.Now().Unix()-p.lastPong) > int64(5*time.Minute)) { - log.Println("Dead peer found .. reaping") - s.peers.Remove(e) } }) @@ -145,8 +143,8 @@ func (s *Ethereum) ReapDeadPeers() { // Start the ethereum func (s *Ethereum) Start() { - // For now this function just blocks the main thread - ln, err := net.Listen("tcp", ":12345") + // Bind to addr and port + ln, err := net.Listen("tcp", ":30303") if err != nil { // This is mainly for testing to create a "network" if ethutil.Config.Debug { @@ -167,6 +165,7 @@ func (s *Ethereum) Start() { // Starting accepting connections go func() { for { + log.Println("Ready and accepting connections") conn, err := ln.Accept() if err != nil { log.Println(err) @@ -184,17 +183,6 @@ func (s *Ethereum) Start() { // Start the tx pool s.TxPool.Start() - - // TMP - /* - go func() { - for { - s.Broadcast("block", s.blockManager.bc.GenesisBlock().RlpEncode()) - - time.Sleep(1000 * time.Millisecond) - } - }() - */ } func (s *Ethereum) Stop() {