Skip to content

Commit

Permalink
improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanBratanov committed Dec 19, 2024
1 parent 25b00d8 commit 9d1d5d9
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -505,15 +505,20 @@ private BlockBlobSidecarsTracker internalOnNewBlock(

countBlock(remoteOrigin);

if (existingTracker.isRpcBlockFetchTriggered() && !existingTracker.isComplete()) {
// if we attempted to fetch this block via RPC, 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
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(() -> fetchMissingBlockOrBlobsFromRPC(slotAndBlockRoot))
.thenRun(
() -> {
// respect the RPC fetch delay
if (existingTracker.isRpcBlockFetchTriggered()) {
fetchMissingBlockOrBlobsFromRPC(slotAndBlockRoot);
}
})
.finish(this::logBlockOrBlobsRPCFailure));
}
});
Expand Down

0 comments on commit 9d1d5d9

Please sign in to comment.