7311: Only attempt to remove headers on successful requests

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
pull/7638/head
Matilda Clerke 4 weeks ago
parent 84b422c5ce
commit 8e6e2b0c87
  1. 4
      ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/DownloadReceiptsStep.java

@ -96,9 +96,9 @@ public class DownloadReceiptsStep
throw new IllegalStateException(
"Unexpectedly got receipts for block header already populated!");
}));
// remove all the headers we found receipts for
headers.removeAll(getReceipts.keySet());
}
// remove all the headers we found receipts for
headers.removeAll(getReceipts.keySet());
// repeat until all headers have receipts
} while (!headers.isEmpty());
return CompletableFuture.completedFuture(getReceipts);

Loading…
Cancel
Save