eth, eth/fetcher: cache future propagated blocks too

This commit is contained in:
Péter Szilágyi
2015-06-16 18:14:52 +03:00
parent 057bc237ad
commit 11c8f83a58
3 changed files with 51 additions and 0 deletions

View File

@ -340,6 +340,8 @@ func (self *ProtocolManager) handleMsg(p *peer) error {
}
request.Block.ReceivedAt = msg.ReceivedAt
// Try to import the propagated block, also making it fill any fetcher gaps
self.fetcher.Enqueue(p.id, request.Block)
if err := self.importBlock(p, request.Block, request.TD); err != nil {
return err
}