Browse Source

Have you seen my parents, sir?

obscuren 11 years ago
parent
commit
44d50bc8d2
2 changed files with 2 additions and 2 deletions
  1. 2 1
      block_pool.go
  2. 0 1
      peer.go

+ 2 - 1
block_pool.go

@@ -76,7 +76,8 @@ func (self *BlockPool) SetBlock(b *ethchain.Block, peer *Peer) {
 		self.hashPool = append(self.hashPool, b.Hash())
 		self.pool[hash] = &block{peer, peer, b, time.Now(), 0}
 
-		if !self.eth.BlockChain().HasBlock(b.PrevHash) && self.pool[string(b.PrevHash)] == nil {
+		if !self.eth.BlockChain().HasBlock(b.PrevHash) {
+			poollogger.Infof("Unknown block, requesting parent (%x...)\n", b.PrevHash[0:4])
 			peer.QueueMessage(ethwire.NewMessage(ethwire.MsgGetBlockHashesTy, []interface{}{b.PrevHash, uint32(256)}))
 		}
 	} else if self.pool[hash] != nil {

+ 0 - 1
peer.go

@@ -344,7 +344,6 @@ out:
 		// Service timer takes care of peer broadcasting, transaction
 		// posting or block posting
 		case <-serviceTimer.C:
-
 			p.QueueMessage(ethwire.NewMessage(ethwire.MsgGetPeersTy, ""))
 
 		case <-p.quit: