diff options
author | obscuren <geffobscura@gmail.com> | 2014-09-25 03:13:35 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-09-25 03:13:35 +0800 |
commit | 496df5c29a28aaa03ac5ffbdcf36928095163a4f (patch) | |
tree | 67787cd0913b9df7b4378d959611a5cf2ed96754 | |
parent | ecdda018415a89e4a55c2cb04378f005192f7525 (diff) | |
parent | 3aeba50c38e74bc1091895db1cb57e7d93864270 (diff) | |
download | dexon-496df5c29a28aaa03ac5ffbdcf36928095163a4f.tar.gz dexon-496df5c29a28aaa03ac5ffbdcf36928095163a4f.tar.zst dexon-496df5c29a28aaa03ac5ffbdcf36928095163a4f.zip |
Merge branch 'master' into develop
-rw-r--r-- | ethereum.go | 1 | ||||
-rw-r--r-- | peer.go | 8 |
2 files changed, 4 insertions, 5 deletions
diff --git a/ethereum.go b/ethereum.go index 389b9d4e4..d04b08960 100644 --- a/ethereum.go +++ b/ethereum.go @@ -386,6 +386,7 @@ func (s *Ethereum) ReapDeadPeerHandler() { // Start the ethereum func (s *Ethereum) Start(seed bool) { s.reactor.Start() + s.blockPool.Start() // Bind to addr and port ln, err := net.Listen("tcp", ":"+s.Port) if err != nil { @@ -311,7 +311,7 @@ func (p *Peer) writeMessage(msg *ethwire.Msg) { func (p *Peer) HandleOutbound() { // The ping timer. Makes sure that every 2 minutes a ping is send to the peer pingTimer := time.NewTicker(pingPongTimer) - serviceTimer := time.NewTicker(5 * time.Minute) + serviceTimer := time.NewTicker(5 * time.Second) out: for { @@ -345,10 +345,8 @@ out: // Service timer takes care of peer broadcasting, transaction // posting or block posting case <-serviceTimer.C: - if p.caps&CapPeerDiscTy > 0 { - msg := p.peersMessage() - p.ethereum.BroadcastMsg(msg) - } + + //p.QueueMessage(ethwire.NewMessage(ethwire.MsgGetPeersTy, "")) case <-p.quit: // Break out of the for loop if a quit message is posted |