Skip to content

Commit 3764895

Browse files
committed
return true on lookup completed to ensure child lookup is progressed
1 parent 910b147 commit 3764895

File tree

1 file changed

+2
-2
lines changed
  • beacon_node/network/src/sync/block_lookups

1 file changed

+2
-2
lines changed

beacon_node/network/src/sync/block_lookups/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
237237

238238
/// Searches for a single block hash. If the blocks parent is unknown, a chain of blocks is
239239
/// constructed.
240-
/// Returns true if the lookup is created or already exists
240+
/// Returns true if the lookup is created, already exists, or was already completed.
241241
fn new_current_lookup(
242242
&mut self,
243243
block_root: Hash256,
@@ -249,7 +249,7 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
249249
) -> bool {
250250
// If the lookup is complete, don't create a new one.
251251
if self.completed_lookups.contains(&block_root) {
252-
return false;
252+
return true;
253253
}
254254

255255
// If this block or it's parent is part of a known failed chain, ignore it.

0 commit comments

Comments
 (0)