Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanBratanov committed Dec 31, 2024
1 parent dabf920 commit 1f24a22
Showing 1 changed file with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,12 @@ SafeFuture<FetchResult<List<BlobSidecar>>> fetch(final Eth2Peer peer) {
.thenApply(__ -> FetchResult.createSuccessful(peer, blobSidecars))
.exceptionally(
err -> {
logFetchError(peer, err);
LOG.error(
String.format(
"Failed to fetch %d blob sidecars for block root %s from peer %s",
blobIdentifiers.size(), blockRoot, peer.getId()),
err);
return FetchResult.createFailed(peer, Status.FETCH_FAILED);
});
}

private void logFetchError(final Eth2Peer peer, final Throwable err) {
LOG.error(
String.format(
"Failed to fetch %d blob sidecars for block root %s from peer %s",
blobIdentifiers.size(), blockRoot, peer.getId()),
err);
}
}

0 comments on commit 1f24a22

Please sign in to comment.