Commit aa250e22 authored by Péter Szilágyi's avatar Péter Szilágyi

eth: don't refetch non fitting blocks to avoid duplicates

parent cf7c44a7
...@@ -214,7 +214,7 @@ func (pm *ProtocolManager) fetcher() { ...@@ -214,7 +214,7 @@ func (pm *ProtocolManager) fetcher() {
if announce := pending[hash]; announce != nil { if announce := pending[hash]; announce != nil {
// Drop the block if it surely cannot fit // Drop the block if it surely cannot fit
if pm.chainman.HasBlock(hash) || !pm.chainman.HasBlock(block.ParentHash()) { if pm.chainman.HasBlock(hash) || !pm.chainman.HasBlock(block.ParentHash()) {
delete(pending, hash) // delete(pending, hash) // if we drop, it will re-fetch it, wait for timeout?
continue continue
} }
// Otherwise accumulate for import // Otherwise accumulate for import
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment