eth/fetcher: unindent a clause per review request

This commit is contained in:
Péter Szilágyi 2023-10-11 10:46:24 +03:00
parent 69f4fabcfa
commit 9fb7c9a30b

View file

@ -870,7 +870,10 @@ func (f *TxFetcher) scheduleFetches(timer *mclock.Timer, timeout chan struct{},
bytes uint64 bytes uint64
) )
f.forEachAnnounce(f.announces[peer], func(hash common.Hash, meta *txMetadata) bool { f.forEachAnnounce(f.announces[peer], func(hash common.Hash, meta *txMetadata) bool {
if _, ok := f.fetching[hash]; !ok { // If the transaction is alcear fetching, skip to the next one
if _, ok := f.fetching[hash]; ok {
return true
}
// Mark the hash as fetching and stash away possible alternates // Mark the hash as fetching and stash away possible alternates
f.fetching[hash] = peer f.fetching[hash] = peer
@ -891,8 +894,7 @@ func (f *TxFetcher) scheduleFetches(timer *mclock.Timer, timeout chan struct{},
return false return false
} }
} }
} return true // scheduled, try to add more
return true // continue in the for-each
}) })
// If any hashes were allocated, request them from the peer // If any hashes were allocated, request them from the peer
if len(hashes) > 0 { if len(hashes) > 0 {