aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-01-28 05:13:46 +0800
committerobscuren <geffobscura@gmail.com>2014-01-28 05:13:46 +0800
commit4a82230de58077b2f947dced27cce0e2abb6272e (patch)
tree0f33f6e30b6ccc155db23432b9e23bf80a45cb15
parent884f7928717394d631fbc8b721d8ee297f060e5b (diff)
downloaddexon-4a82230de58077b2f947dced27cce0e2abb6272e.tar.gz
dexon-4a82230de58077b2f947dced27cce0e2abb6272e.tar.zst
dexon-4a82230de58077b2f947dced27cce0e2abb6272e.zip
Switched port and removed logging
-rw-r--r--ethereum.go18
1 files 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() {