class ThrottlingSyncSource implements SyncSource {

  @Override
  public SafeFuture<Void> requestBlocksByRange(
      final UInt64 startSlot,
      final UInt64 count,
      final UInt64 step,
      final ResponseStreamListener<SignedBeaconBlock> listener) {
    if (rateTracker.wantToRequestObjects(count.longValue()) > 0) {
      LOG.debug("Sending request for {} blocks", count);
      return delegate.requestBlocksByRange(startSlot, count, step, listener);
    } else {
      return asyncRunner.runAfterDelay(
          () -> requestBlocksByRange(startSlot, count, step, listener), 3, TimeUnit.SECONDS);
    }
  }

  public  ThrottlingSyncSource(
      final AsyncRunner asyncRunner,
      final TimeProvider timeProvider,
      final SyncSource delegate,
      final int maxBlocksPerMinute);

}