Commit 496df5c2 authored by obscuren's avatar obscuren

Merge branch 'master' into develop

parents ecdda018 3aeba50c
...@@ -386,6 +386,7 @@ func (s *Ethereum) ReapDeadPeerHandler() { ...@@ -386,6 +386,7 @@ func (s *Ethereum) ReapDeadPeerHandler() {
// Start the ethereum // Start the ethereum
func (s *Ethereum) Start(seed bool) { func (s *Ethereum) Start(seed bool) {
s.reactor.Start() s.reactor.Start()
s.blockPool.Start()
// Bind to addr and port // Bind to addr and port
ln, err := net.Listen("tcp", ":"+s.Port) ln, err := net.Listen("tcp", ":"+s.Port)
if err != nil { if err != nil {
......
...@@ -311,7 +311,7 @@ func (p *Peer) writeMessage(msg *ethwire.Msg) { ...@@ -311,7 +311,7 @@ func (p *Peer) writeMessage(msg *ethwire.Msg) {
func (p *Peer) HandleOutbound() { func (p *Peer) HandleOutbound() {
// The ping timer. Makes sure that every 2 minutes a ping is send to the peer // The ping timer. Makes sure that every 2 minutes a ping is send to the peer
pingTimer := time.NewTicker(pingPongTimer) pingTimer := time.NewTicker(pingPongTimer)
serviceTimer := time.NewTicker(5 * time.Minute) serviceTimer := time.NewTicker(5 * time.Second)
out: out:
for { for {
...@@ -345,10 +345,8 @@ out: ...@@ -345,10 +345,8 @@ out:
// Service timer takes care of peer broadcasting, transaction // Service timer takes care of peer broadcasting, transaction
// posting or block posting // posting or block posting
case <-serviceTimer.C: case <-serviceTimer.C:
if p.caps&CapPeerDiscTy > 0 {
msg := p.peersMessage() //p.QueueMessage(ethwire.NewMessage(ethwire.MsgGetPeersTy, ""))
p.ethereum.BroadcastMsg(msg)
}
case <-p.quit: case <-p.quit:
// Break out of the for loop if a quit message is posted // Break out of the for loop if a quit message is posted
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment