private void handleConfirmationResult(final FastSyncState fastSyncState, final Throwable error) {
    if (error != null) {
      final Throwable rootCause = ExceptionUtils.rootCause(error);
      if (rootCause instanceof PivotBlockConfirmer.ContestedPivotBlockException) {
        final long blockNumber =
            ((PivotBlockConfirmer.ContestedPivotBlockException) error).getBlockNumber();
        handleContestedPivotBlock(blockNumber);
      } else {
        LOG.error("Encountered error while requesting pivot block header", error);
        result.completeExceptionally(error);
      }
      return;
    }

    result.complete(fastSyncState);
  }
This task attempts to find a non-controversial pivot block by confirming the pivot block number
with a minimum number of peers. If a particular pivot block cannot be confirmed, the pivot block
number is pushed back and the confirmation process repeats. If a maximum number of retries is
reached, the task fails with a {@code FastSyncException} containing {@code
FastSyncError.PIVOT_BLOCK_HEADER_MISMATCH}.
ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/PivotBlockRetriever.java