anchor.diff:  %%% Internal functions
   %%%=============================================================================
   
  -ensure_tab(T, Opts) ->
  -    case ets:info(T, name) of
  -        undefined ->
  -            ets:new(T, [{heir, self(), []}|Opts]);
  -        _ ->
  -            true
  -    end.
  -
   header_hash(Block) ->
       Header = aec_blocks:to_header(Block),
       {ok, HeaderHash} = aec_headers:hash_header(Header),
  
positive.code:     jobs:enqueue(sync_jobs, {start_sync, PeerUri}),
      {noreply, State};
  handle_cast({received_block, Block}, State) ->
      HdrHash = header_hash(Block),
      case aec_chain:get_block_by_hash(HdrHash) of
          {ok, _} ->
              %% we have the block; do not re-send
              {noreply, State};
          {error, _} ->
              cache_and_queue_block(HdrHash, Block, received, forward, State),
              {noreply, State}
      end;
  handle_cast({block_created, Block}, State) ->
      HdrHash = header_hash(Block),
      cache_and_queue_block(HdrHash, Block, created, forward, State),
      publish(block_created, aec_blocks:height(Block)),
      {noreply, State};
  handle_cast(_, State) ->
  
negative.code: 
  %% Callback for jobs producer queue
  -export([sync_worker/0]).
  
  -type ping_obj() :: map().
  
  