Skip to content

Commit aa250e2

Browse files
committed
eth: don't refetch non fitting blocks to avoid duplicates
1 parent cf7c44a commit aa250e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

eth/sync.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ func (pm *ProtocolManager) fetcher() {
214214
if announce := pending[hash]; announce != nil {
215215
// Drop the block if it surely cannot fit
216216
if pm.chainman.HasBlock(hash) || !pm.chainman.HasBlock(block.ParentHash()) {
217-
delete(pending, hash)
217+
// delete(pending, hash) // if we drop, it will re-fetch it, wait for timeout?
218218
continue
219219
}
220220
// Otherwise accumulate for import

0 commit comments

Comments
 (0)