private int findNextIndex(final int startIndex) {
    for (int i = startIndex; i < resultSize; i++) {
      if (result[i] == null) {
        return i;
      }
    }
    return -1; // This only happens when we have finished processing all headers
  }
Retrieves all remaining blocks from connected peers. Subsequent calls will have no affect.

@return A List of all blocks for the headers supplied when constructing this
    CompleteBlocksWithPeerTask
ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/sync/tasks/CompleteBlocksWithPeerTask.java