Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanBratanov committed Jan 11, 2025
1 parent fba9f8c commit 1335519
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ public SafeFuture<Void> requestBlocksByRange(
final UInt64 startSlot,
final UInt64 count,
final RpcResponseListener<SignedBeaconBlock> listener) {
final RpcResponseListenerWithCount<SignedBeaconBlock> listenerWithCount =
new RpcResponseListenerWithCount<>(listener);
return blocksRateTracker
.approveObjectsRequest(count.longValue())
.map(
requestApproval -> {
LOG.debug("Sending request for {} blocks", count);
final RpcResponseListenerWithCount<SignedBeaconBlock> listenerWithCount =
new RpcResponseListenerWithCount<>(listener);
return delegate
.requestBlocksByRange(startSlot, count, listenerWithCount)
.alwaysRun(
Expand All @@ -97,8 +97,6 @@ public SafeFuture<Void> requestBlocksByRange(
@Override
public SafeFuture<Void> requestBlobSidecarsByRange(
final UInt64 startSlot, final UInt64 count, final RpcResponseListener<BlobSidecar> listener) {
final RpcResponseListenerWithCount<BlobSidecar> listenerWithCount =
new RpcResponseListenerWithCount<>(listener);
long blobSidecarsCount =
maybeMaxBlobsPerBlock
.map(maxBlobsPerBlock -> maxBlobsPerBlock * count.longValue())
Expand All @@ -108,6 +106,8 @@ public SafeFuture<Void> requestBlobSidecarsByRange(
.map(
requestApproval -> {
LOG.debug("Sending request for ~ {} blob sidecars", blobSidecarsCount);
final RpcResponseListenerWithCount<BlobSidecar> listenerWithCount =
new RpcResponseListenerWithCount<>(listener);
return delegate
.requestBlobSidecarsByRange(startSlot, count, listenerWithCount)
.alwaysRun(
Expand Down

0 comments on commit 1335519

Please sign in to comment.