mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2025-01-12 21:50:04 +00:00
Have you seen my parents, sir?
This commit is contained in:
parent
e20b113053
commit
44d50bc8d2
@ -76,7 +76,8 @@ func (self *BlockPool) SetBlock(b *ethchain.Block, peer *Peer) {
|
|||||||
self.hashPool = append(self.hashPool, b.Hash())
|
self.hashPool = append(self.hashPool, b.Hash())
|
||||||
self.pool[hash] = &block{peer, peer, b, time.Now(), 0}
|
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)}))
|
peer.QueueMessage(ethwire.NewMessage(ethwire.MsgGetBlockHashesTy, []interface{}{b.PrevHash, uint32(256)}))
|
||||||
}
|
}
|
||||||
} else if self.pool[hash] != nil {
|
} else if self.pool[hash] != nil {
|
||||||
|
1
peer.go
1
peer.go
@ -344,7 +344,6 @@ 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:
|
||||||
|
|
||||||
p.QueueMessage(ethwire.NewMessage(ethwire.MsgGetPeersTy, ""))
|
p.QueueMessage(ethwire.NewMessage(ethwire.MsgGetPeersTy, ""))
|
||||||
|
|
||||||
case <-p.quit:
|
case <-p.quit:
|
||||||
|
Loading…
Reference in New Issue
Block a user