Browse Source

merge error

obscuren 11 years ago
parent
commit
3aeba50c38
2 changed files with 4 additions and 5 deletions
  1. 1 0
      ethereum.go
  2. 3 5
      peer.go

+ 1 - 0
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 {

+ 3 - 5
peer.go

@@ -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