From 44d50bc8d2e8bf4a87d01d6ded24d79eb50ee666 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 26 Sep 2014 20:51:31 +0200 Subject: Have you seen my parents, sir? --- block_pool.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'block_pool.go') diff --git a/block_pool.go b/block_pool.go index 73507a185..26ef51992 100644 --- a/block_pool.go +++ b/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 { -- cgit v1.2.3