     delta = current_height - blocks
     if delta < 1, do: 1, else: delta
   end
-  
+
   def handle_info(msg, state) do
     Logger.info("unexpected msg: #{inspect msg}")
   end

  require Logger
  alias Ecto.Adapters.SQL
  # @blocks_per_tick 100
  @tick_duration 300_000
  @lookback_max_blocks 201_600

  def start_link(args, options) do

      SELECT height
      FROM #{table}
    )
    LIMIT 1000
    ;
    """)
    {:ok, %{rows: rows}} = SQL.query(Repo, q)
