提交 44d50bc8 编写于 作者: O obscuren

Have you seen my parents, sir?

上级 e20b1130
......@@ -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 {
......
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册