anchor.diff:  get_missing_block_hashes(undefined, _, _State) ->
       [];
   get_missing_block_hashes(TopHash, undefined, State) ->
  -    {ok, GenesisNode} = find_genesis_node(State),
  -    get_missing_block_hashes(TopHash, hash(GenesisNode), State);
  +    case get_genesis_hash(State) of
  +        undefined -> [];
  +        Hash      -> get_missing_block_hashes(TopHash, Hash, State)
  +    end;
   get_missing_block_hashes(FromHash, ToHash, State) ->
       Hashes = get_hashes_between(FromHash, ToHash, State),
       lists:filter(fun(H) -> not node_is_block(blocks_db_get(H, State))end,
  
positive.code: node_target(#node{type = header, content = X}) -> aec_headers:target(X);
  node_target(#node{type = block , content = X}) -> aec_blocks:target(X).
  
  find_genesis_node(State) ->
      case get_block(get_genesis_hash(State), State) of
          error -> not_found;
  
negative.code: 
  -spec insert_block(#block{}, state()) -> {'ok', state()} | {'error', any()}.
  insert_block(Block, ?assert_state() = State0) ->
      Node = wrap_block(Block),
      try internal_insert(Node, State0) of
          State1 -> {ok, maybe_add_genesis_hash(State1, Node)}
      catch throw:?internal_error(What) -> {error, What}
      end.
  
  -spec insert_header(#header{}, state()) -> {'ok', state()} | {'error', any()}.
  insert_header(Header, ?assert_state() = State) ->
      Node = wrap_header(Header),
      try internal_insert(Node, State) of
          State1 -> {ok, maybe_add_genesis_hash(State1, Node)}
      catch throw:?internal_error(What) -> {error, What}
      end.
  
  