Skip to content

Commit

Permalink
tiny cleanups on BlockBlobSidecarsTrackersPoolImpl (#8972)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbenr authored Jan 8, 2025
1 parent 85ca2b5 commit c0a17cf
Showing 1 changed file with 15 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,6 @@ public synchronized int getTotalBlobSidecarsTrackers() {
return blockBlobSidecarsTrackers.size();
}

@SuppressWarnings("FutureReturnValueIgnored")
private BlockBlobSidecarsTracker internalOnNewBlock(
final SignedBeaconBlock block, final Optional<RemoteOrigin> remoteOrigin) {
final SlotAndBlockRoot slotAndBlockRoot = block.getSlotAndBlockRoot();
Expand All @@ -502,19 +501,21 @@ private BlockBlobSidecarsTracker internalOnNewBlock(
if (!existingTracker.isComplete()) {
// we missed the opportunity to complete the blob sidecars via local EL and RPC
// (since the block is required to be known) Let's try now
asyncRunner.runAsync(
() ->
fetchMissingBlobsFromLocalEL(slotAndBlockRoot)
.handleException(this::logLocalElBlobsLookupFailure)
.thenRun(
() -> {
// only run if RPC block fetch has happened ( no blobs RPC fetch
// has occurred)
if (existingTracker.isRpcBlockFetchTriggered()) {
fetchMissingBlockOrBlobsFromRPC(slotAndBlockRoot);
}
})
.finish(this::logBlockOrBlobsRPCFailure));
asyncRunner
.runAsync(
() ->
fetchMissingBlobsFromLocalEL(slotAndBlockRoot)
.handleException(this::logLocalElBlobsLookupFailure)
.thenRun(
() -> {
// only run if RPC block fetch has happened
// (no blobs RPC fetch has occurred)
if (existingTracker.isRpcBlockFetchTriggered()) {
fetchMissingBlockOrBlobsFromRPC(slotAndBlockRoot);
}
})
.handleException(this::logBlockOrBlobsRPCFailure))
.ifExceptionGetsHereRaiseABug();
}
});

Expand Down

0 comments on commit c0a17cf

Please sign in to comment.